|
|
@@ -86,6 +86,8 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
|
|
|
private final DistributePointsExchangeMoneyMapper distributePointsExchangeMoneyMapper;
|
|
|
|
|
|
+ private final GoodsDonMapper goodsDonMapper;
|
|
|
+
|
|
|
private final static String CLAUDE_CODE_API_PREFIX = "https://relay01.yhlxj.com/";
|
|
|
|
|
|
public static final String CLAUDE_CODE_HEARD_KEY = "X-Admin-Key";
|
|
|
@@ -762,6 +764,12 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
//调用API重置用户次数
|
|
|
resetUserCredits(claudeCodeUser.getUserId(), creditResetReq);
|
|
|
|
|
|
+ ClaudeCodeUserResetRecord resetRecord = new ClaudeCodeUserResetRecord();
|
|
|
+ resetRecord.setUserId(userId);
|
|
|
+ resetRecord.setNum(-1);
|
|
|
+ resetRecord.setResetReason("使用重置次数");
|
|
|
+ claudeCodeUserResetRecordMapper.insert(resetRecord);
|
|
|
+
|
|
|
} else {
|
|
|
throw BusinessRuntimeException.getInstance("使用重置次数失败");
|
|
|
}
|
|
|
@@ -864,7 +872,7 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
return beanSearcher.search(ClaudeCodeUserResetRecordView.class, MapUtils.builder()
|
|
|
.field(ClaudeCodeUserResetRecordView::getUserId, userIdList).op(Operator.InList)
|
|
|
.page(page, limit)
|
|
|
- .orderBy(ClaudeCodeUserResetRecordView::getCreateTime).desc()
|
|
|
+ .orderBy(ClaudeCodeUserResetRecordView::getCreatedTime).desc()
|
|
|
.build());
|
|
|
}
|
|
|
|
|
|
@@ -920,6 +928,11 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
waitingPoints = points.get();
|
|
|
}
|
|
|
}
|
|
|
+ GoodsDon goodsDon = goodsDonMapper.selectById(Constant.CLAUDE_CODE_GOODS_ID);
|
|
|
+ //cc 分销平台比例
|
|
|
+ if (goodsDon != null) {
|
|
|
+ response.setRate(goodsDon.getRate());
|
|
|
+ }
|
|
|
|
|
|
if (user.getPoints().compareTo(BigDecimal.ZERO) <= 0 && waitingPoints.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
response.setGotMoney(BigDecimal.ZERO);
|
|
|
@@ -1009,6 +1022,7 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
resetRecord.setOrderId(orderId);
|
|
|
resetRecord.setUserId(userId);
|
|
|
resetRecord.setResetReason(remark);
|
|
|
+ resetRecord.setNum(num);
|
|
|
claudeCodeUserResetRecordMapper.insert(resetRecord);
|
|
|
}
|
|
|
}
|