|
|
@@ -254,25 +254,25 @@ public class CodexServiceImpl implements CodexService {
|
|
|
|
|
|
//锁一个cc的车票id
|
|
|
//是否存在无赠送的claude code 直接原规格上抵扣
|
|
|
- List<Long> sendCodexSkuIds = skuMapper.selectList(Wrappers.lambdaQuery(GoodsDonSku.class).eq(GoodsDonSku::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID).eq(GoodsDonSku::getIsCodex, Boolean.TRUE)).stream().map(GoodsDonSku::getId).collect(Collectors.toList());
|
|
|
+// List<Long> sendCodexSkuIds = skuMapper.selectList(Wrappers.lambdaQuery(GoodsDonSku.class).eq(GoodsDonSku::getGoodsId, Constant.CLAUDE_CODE_GOODS_ID).eq(GoodsDonSku::getIsCodex, Boolean.TRUE)).stream().map(GoodsDonSku::getId).collect(Collectors.toList());
|
|
|
//cc车票id
|
|
|
Long ccRelationId = null;
|
|
|
- if (CollUtil.isEmpty(sendCodexSkuIds)) {
|
|
|
- //是否存在cc
|
|
|
- Integer selectCount = claudeCodeUserMapper.selectCount(Wrappers.lambdaQuery(ClaudeCodeUser.class).in(ClaudeCodeUser::getUserId, userIdList));
|
|
|
- if (selectCount > 0) {
|
|
|
- throw BusinessRuntimeException.getInstance("你存在claude code 无法抵扣");
|
|
|
- }
|
|
|
- } else {
|
|
|
- GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
|
|
|
- .field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
|
|
|
- .field(GroupsRelationMirrorView::getSkuId, sendCodexSkuIds).op(Operator.NotIn)
|
|
|
- .field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
|
|
|
- .build());
|
|
|
- if (groupsRelationMirrorView != null) {
|
|
|
- ccRelationId = groupsRelationMirrorView.getId();
|
|
|
- }
|
|
|
- }
|
|
|
+// if (CollUtil.isEmpty(sendCodexSkuIds)) {
|
|
|
+// //是否存在cc
|
|
|
+// Integer selectCount = claudeCodeUserMapper.selectCount(Wrappers.lambdaQuery(ClaudeCodeUser.class).in(ClaudeCodeUser::getUserId, userIdList));
|
|
|
+// if (selectCount > 0) {
|
|
|
+// throw BusinessRuntimeException.getInstance("你存在claude code 无法抵扣");
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// GroupsRelationMirrorView groupsRelationMirrorView = beanSearcher.searchFirst(GroupsRelationMirrorView.class, MapUtils.builder()
|
|
|
+// .field(GroupsRelationMirrorView::getUserId, userIdList).op(Operator.InList)
|
|
|
+// .field(GroupsRelationMirrorView::getSkuId, sendCodexSkuIds).op(Operator.NotIn)
|
|
|
+// .field(GroupsRelationMirrorView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
|
|
|
+// .build());
|
|
|
+// if (groupsRelationMirrorView != null) {
|
|
|
+// ccRelationId = groupsRelationMirrorView.getId();
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
GroupsRelation relation = getClaudeCodeRelation(userId, sku);
|
|
|
orderDon.setRelationId(relation.getId());
|