|
|
@@ -2097,22 +2097,26 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
// }
|
|
|
}
|
|
|
}
|
|
|
- distributeWaitingSendPointsMapper.insert(distributeWaitingSendPoints);
|
|
|
- //暂定虚物 商务可首单提成
|
|
|
- if (businessId != null) {
|
|
|
- //给商务人员 分配提成权益
|
|
|
- userBusinessFrontService.taskDistributeRateBenefits(userDistributeShared.getSharedId(), businessId, goodsDon.getType(), order, rate);
|
|
|
- }
|
|
|
- //是否是cc普通推广
|
|
|
- //并且购买claude code作为首单
|
|
|
- if (userDistribute == null && Constant.CC_DISTRIBUTE_MARK.equals(userDistributeShared.getRemark()) && order.getGoodsId() == Constant.CLAUDE_CODE_GOODS_ID) {
|
|
|
- //普通推广用户首单,给上级渠道发放 claude code 积分卡
|
|
|
- try {
|
|
|
- claudeCodeService.adjUserRestNum(order.getId(), userDistributeShared.getSharedId(), 1, "新用户下单");
|
|
|
- log.info("用户{}邀请新用户{}首单,发放claude code积分卡成功", userDistributeShared.getSharedId(), order.getUserId());
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("给用户{}发放claude code积分卡失败:{}", userDistributeShared.getSharedId(), e.getMessage());
|
|
|
+ try {
|
|
|
+ distributeWaitingSendPointsMapper.insert(distributeWaitingSendPoints);
|
|
|
+ //暂定虚物 商务可首单提成
|
|
|
+ if (businessId != null) {
|
|
|
+ //给商务人员 分配提成权益
|
|
|
+ userBusinessFrontService.taskDistributeRateBenefits(userDistributeShared.getSharedId(), businessId, goodsDon.getType(), order, rate);
|
|
|
}
|
|
|
+ //是否是cc普通推广
|
|
|
+ //并且购买claude code作为首单
|
|
|
+ if (userDistribute == null && Constant.CC_DISTRIBUTE_MARK.equals(userDistributeShared.getRemark()) && order.getGoodsId() == Constant.CLAUDE_CODE_GOODS_ID) {
|
|
|
+ //普通推广用户首单,给上级渠道发放 claude code 积分卡
|
|
|
+ try {
|
|
|
+ claudeCodeService.adjUserRestNum(order.getId(), userDistributeShared.getSharedId(), 1, "新用户下单");
|
|
|
+ log.info("用户{}邀请新用户{}首单,发放claude code积分卡成功", userDistributeShared.getSharedId(), order.getUserId());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("给用户{}发放claude code积分卡失败:{}", userDistributeShared.getSharedId(), e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (DuplicateKeyException e) {
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|