|
|
@@ -395,6 +395,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
|
|
|
private final UserTicketClearedRecordMapper userTicketClearedRecordMapper;
|
|
|
|
|
|
+ private final CodexUserMapper codexUserMapper;
|
|
|
+
|
|
|
private final List<String> noChekGoodsTemp = List.of("Apple One", "Youtube", "Spotify");
|
|
|
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
|
@@ -468,10 +470,10 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
throw new BusinessRuntimeException("您有未支付订单.");
|
|
|
}
|
|
|
}
|
|
|
+ List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
//claude code限购
|
|
|
if (goodsId == Constant.CLAUDE_CODE_GOODS_ID) {
|
|
|
//是否拥有这张车票
|
|
|
- List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
Integer selectCount = groupsRelationMapper.selectCountByGoodsId(userIdList, Constant.CLAUDE_CODE_GOODS_ID, DateTime.now());
|
|
|
if (selectCount > 0) {
|
|
|
throw BusinessRuntimeException.getInstance("claude code车票限购一次");
|
|
|
@@ -481,6 +483,14 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
checkCCTrialCardNum(userIdList);
|
|
|
}
|
|
|
}
|
|
|
+ //codex 限购
|
|
|
+ if (goodsId == Constant.CODEX_GOODS_ID) {
|
|
|
+ Integer selectCount = groupsRelationMapper.selectCountByGoodsId(userIdList, Constant.CODEX_GOODS_ID, DateTime.now());
|
|
|
+ if (selectCount > 0) {
|
|
|
+ throw BusinessRuntimeException.getInstance("codex车票限购一次");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//校验奈飞限购信息
|
|
|
checkNfPayLimit(goodsId, userId);
|
|
|
GroupsRelation relation = null;
|
|
|
@@ -580,7 +590,6 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
//租赁商品
|
|
|
if (goodsDon.getType() == 4) {
|
|
|
//是否已实名认证过
|
|
|
- List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, user);
|
|
|
Integer count = userCertRecordMapper.selectCount(Wrappers.lambdaQuery(UserCertRecord.class).in(UserCertRecord::getUserId, userIdList));
|
|
|
if (count == 0) throw BusinessRuntimeException.getInstance("请您先完成实名认证..");
|
|
|
|