|
|
@@ -779,7 +779,7 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
|
- public ClaudeCodeResp useCreditCard(ClaudeCodeCreditCardUseReq req) throws Exception {
|
|
|
+ public void useCreditCard(ClaudeCodeCreditCardUseReq req) throws Exception {
|
|
|
Long userId = req.getUserId();
|
|
|
List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
|
|
|
@@ -848,18 +848,8 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
useCreditCard(userId, addCodePoints, cardNumber, "使用积分卡");
|
|
|
|
|
|
log.info("用户{}成功使用积分卡{},增加{}积分", userId, cardNumber, addCodePoints);
|
|
|
-
|
|
|
- ClaudeCodeResp resp = new ClaudeCodeResp();
|
|
|
- resp.setSuccess(true);
|
|
|
- resp.setMessage("积分卡使用成功");
|
|
|
- resp.setData(Map.of(
|
|
|
- "beforeCodePoints", beforeCodePoints,
|
|
|
- "addCodePoints", addCodePoints,
|
|
|
- "afterCodePoints", afterCodePoints
|
|
|
- ));
|
|
|
//调用API调整用户积分
|
|
|
adjClaudeCodeUserPoints(claudeCodeUser.getUserId(), creditCard.getCreditAmount(), "adjustment", "用户使用积分卡");
|
|
|
- return resp;
|
|
|
} else {
|
|
|
throw new BusinessRuntimeException("积分卡使用失败,请重试");
|
|
|
}
|