zoujiajian 3 bulan lalu
induk
melakukan
3cca539f3f

+ 4 - 16
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -2780,14 +2780,14 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 					.orderByDesc(OrderDon::getId)
 					.last("limit 1"));
 			if (sourceOrder == null) {
-				throw BusinessRuntimeException.getInstance("仅限 2026-05-03 后购买的用户领取");
+				throw BusinessRuntimeException.getInstance("不符合领取要求");
 			}
 			Integer receivedCount = ticketRedemptionCodeRecordMapper.selectCount(Wrappers.lambdaQuery(TicketRedemptionCodeRecord.class)
 					.in(TicketRedemptionCodeRecord::getUserId, userIds)
 					.eq(TicketRedemptionCodeRecord::getSkuId, Constant.GPT_ACTIVITY_GIFT_SKU_ID)
 					.eq(TicketRedemptionCodeRecord::getSourceType, RedisKey.GPT_API_QUOTA_KEY));
 			if (receivedCount > 0) {
-				throw BusinessRuntimeException.getInstance("您已领取过该权益");
+				throw BusinessRuntimeException.getInstance("您已领取");
 			}
 
 			TicketRedemptionCodeRecord record = new TicketRedemptionCodeRecord();
@@ -2802,13 +2802,6 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 			ticketRedemptionCodeRecordMapper.insert(record);
 
 			GoodsDonSku giftSku = goodsDonSkuMapper.selectById(Constant.GPT_ACTIVITY_GIFT_SKU_ID);
-			if (giftSku == null || !Boolean.TRUE.equals(giftSku.getStatus())) {
-				record.setStatus("error");
-				record.setErrorMsg("817规格不存在或已下架");
-				ticketRedemptionCodeRecordMapper.updateById(record);
-				throw BusinessRuntimeException.getInstance("817规格不存在或已下架");
-			}
-
 			GroupsRelation giftRelation = null;
 			try {
 				giftRelation = exchangeCodeServiceProvider.getObject().getGroupTripsTicket(null, giftSku, userId, null, OrderDon.Type.EX_CODE, null);
@@ -2845,13 +2838,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 	}
 
 	private GptActivityRedeemResult requestGptActivityRedeemCode(String apiDomain, GroupsRelation giftRelation, GoodsDonSku giftSku) throws Exception {
-		Integer quota = giftSku.getOpenaiQuota();
-		if (quota == null || quota <= 0) {
-			quota = giftSku.getNanoQuota();
-		}
-		if (quota == null || quota <= 0) {
-			throw BusinessRuntimeException.getInstance("817规格未配置兑换额度");
-		}
+        //默认5刀额度
+        Integer quota = 2500000;
 		Long expiredTime = giftRelation.getExpiryTime() == null ? 0L : giftRelation.getExpiryTime().getTime() / 1000;
 		Map<String, Object> params = new HashMap<>();
 		params.put("name", "GPT代充/独立赠送");