|
@@ -391,11 +391,14 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
|
|
|
orderDonMapper.insert(orderDon);
|
|
orderDonMapper.insert(orderDon);
|
|
|
log.info("用户{}兑换规格:{}车位成功", user.getId(), orderDon.getSkuId());
|
|
log.info("用户{}兑换规格:{}车位成功", user.getId(), orderDon.getSkuId());
|
|
|
|
|
|
|
|
- if (relation.getIsClaudeCodeUpgrade() != null && relation.getIsClaudeCodeUpgrade()) {
|
|
|
|
|
- //claude code 是否升级
|
|
|
|
|
|
|
+ if (relation.getIsClaudeCodeRenew() != null && relation.getIsClaudeCodeRenew()) {
|
|
|
|
|
+ //claude code续费
|
|
|
orderDon.setOrderType(2);
|
|
orderDon.setOrderType(2);
|
|
|
orderDonMapper.updateById(orderDon);
|
|
orderDonMapper.updateById(orderDon);
|
|
|
- claudeCodeService.handleClaudeCodeUserPackageSku(relation, sku, orderDon.getId());
|
|
|
|
|
|
|
+ //续费且升级
|
|
|
|
|
+ if (relation.getIsClaudeCodeUpgrade() != null && relation.getIsClaudeCodeUpgrade()) {
|
|
|
|
|
+ claudeCodeService.handleClaudeCodeUserPackageSku(relation, sku, orderDon.getId());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (orderDonTye == OrderDon.Type.EX_CODE) {
|
|
if (orderDonTye == OrderDon.Type.EX_CODE) {
|
|
@@ -444,6 +447,7 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
|
|
|
relation.setExpiryTime(expiryTime);
|
|
relation.setExpiryTime(expiryTime);
|
|
|
groupsRelationMapper.updateById(relation);
|
|
groupsRelationMapper.updateById(relation);
|
|
|
//同规格只加时长
|
|
//同规格只加时长
|
|
|
|
|
+ relation.setIsClaudeCodeRenew(Boolean.TRUE);
|
|
|
if (relationSku.getCodePoints() != sku.getCodePoints()) {
|
|
if (relationSku.getCodePoints() != sku.getCodePoints()) {
|
|
|
relation.setIsClaudeCodeUpgrade(true);
|
|
relation.setIsClaudeCodeUpgrade(true);
|
|
|
}
|
|
}
|