|
@@ -24,6 +24,7 @@ import com.cyksj.mapper.shop.YhShopUserPlatDistributeRateMapper;
|
|
|
import com.cyksj.model.entity.*;
|
|
import com.cyksj.model.entity.*;
|
|
|
import com.cyksj.model.request.UserDistributeReq;
|
|
import com.cyksj.model.request.UserDistributeReq;
|
|
|
import com.cyksj.redis.RedisService;
|
|
import com.cyksj.redis.RedisService;
|
|
|
|
|
+import com.cyksj.service.claude.ClaudeCodeService;
|
|
|
import com.cyksj.service.distribute.DistributeService;
|
|
import com.cyksj.service.distribute.DistributeService;
|
|
|
import com.cyksj.service.market.task.TaskService;
|
|
import com.cyksj.service.market.task.TaskService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -86,6 +87,8 @@ public class DistributeServiceImpl implements DistributeService {
|
|
|
|
|
|
|
|
private final DistributeGeneralSkuRateMapper generalSkuRateMapper;
|
|
private final DistributeGeneralSkuRateMapper generalSkuRateMapper;
|
|
|
|
|
|
|
|
|
|
+ private final ClaudeCodeService claudeCodeService;
|
|
|
|
|
+
|
|
|
private final UserMapper userMapper;
|
|
private final UserMapper userMapper;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -317,7 +320,7 @@ public class DistributeServiceImpl implements DistributeService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public void saveDistributionInvitation(Long sharedId, Long userId, Long dsPopularizeId) {
|
|
|
|
|
|
|
+ public void saveDistributionInvitation(Long sharedId, Long userId, Long dsPopularizeId, Boolean ccGeneralTg) {
|
|
|
if (sharedId == 0l || sharedId.equals(userId)) {
|
|
if (sharedId == 0l || sharedId.equals(userId)) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -330,8 +333,15 @@ public class DistributeServiceImpl implements DistributeService {
|
|
|
//存在分销
|
|
//存在分销
|
|
|
userDistributeShared.setUserId(userId);
|
|
userDistributeShared.setUserId(userId);
|
|
|
userDistributeShared.setDsPopularizeId(dsPopularizeId);
|
|
userDistributeShared.setDsPopularizeId(dsPopularizeId);
|
|
|
|
|
+ if (ccGeneralTg != null) {
|
|
|
|
|
+ //打上普通cc推广标识
|
|
|
|
|
+ userDistributeShared.setRemark(Constant.CC_DISTRIBUTE_MARK);
|
|
|
|
|
+ }
|
|
|
try {
|
|
try {
|
|
|
userDistributeSharedMapper.insert(userDistributeShared);
|
|
userDistributeSharedMapper.insert(userDistributeShared);
|
|
|
|
|
+ //若是cc普通推广 发送claude code积分卡
|
|
|
|
|
+ claudeCodeService.sendCreditCard(null, userDistributeShared.getSharedId(), 1000, Constant.CLAUDE_CODE_CARD_NUMBER + System.currentTimeMillis(), "新用户注册");
|
|
|
|
|
+
|
|
|
TaskType taskType = taskTypeMapper.selectOne(Wrappers.lambdaQuery(TaskType.class)
|
|
TaskType taskType = taskTypeMapper.selectOne(Wrappers.lambdaQuery(TaskType.class)
|
|
|
.eq(TaskType::getName, TaskTypeEnum.share.getDesc()).last("limit 1"));
|
|
.eq(TaskType::getName, TaskTypeEnum.share.getDesc()).last("limit 1"));
|
|
|
taskService.completeTask(taskType, sharedId);
|
|
taskService.completeTask(taskType, sharedId);
|