|
|
@@ -428,7 +428,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
ticket.setIsComplete(orderDon.getStatus() == OrderDon.Status.complete ? true : false);
|
|
|
}
|
|
|
}
|
|
|
- if (isGptApiQuotaSourceTicket(ticket.getGoodsId(), ticket.getSkuNum())) {
|
|
|
+ if (isGptApiQuotaSourceTicket(orderDon, ticket.getGoodsId(), ticket.getSkuNum())) {
|
|
|
markGptApiQuotaReceiveStatus(userIds, ticket);
|
|
|
}
|
|
|
if (lang != null && !StrUtil.equals(UserPageLanguage.Language.zh_CN.name(), lang)) {
|
|
|
@@ -2775,15 +2775,11 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
if (sourceSku == null) {
|
|
|
throw BusinessRuntimeException.getInstance("车票规格不存在");
|
|
|
}
|
|
|
- Long sourceGoodsId = sourceRelation.getGoodsId();
|
|
|
- if (!isGptApiQuotaSourceTicket(sourceGoodsId, sourceSku.getNum())) {
|
|
|
- throw BusinessRuntimeException.getInstance("当前车票不符合领取条件");
|
|
|
- }
|
|
|
-
|
|
|
OrderDon sourceOrder = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
.eq(OrderDon::getRelationId, sourceRelationId)
|
|
|
.in(OrderDon::getUserId, userIds)
|
|
|
- .notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
|
|
|
+ .eq(OrderDon::getOrderType, 1)
|
|
|
+ .notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
|
|
|
.and(wrapper -> wrapper.ge(OrderDon::getPayTime, GPT_ACTIVITY_PAY_TIME_BEGIN)
|
|
|
.or(sub -> sub.isNull(OrderDon::getPayTime).ge(OrderDon::getCreatedTime, GPT_ACTIVITY_PAY_TIME_BEGIN)))
|
|
|
.orderByDesc(OrderDon::getId)
|
|
|
@@ -2791,6 +2787,11 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
if (sourceOrder == null) {
|
|
|
throw BusinessRuntimeException.getInstance("不符合领取要求");
|
|
|
}
|
|
|
+ Long sourceGoodsId = sourceRelation.getGoodsId();
|
|
|
+ if (!isGptApiQuotaSourceTicket(sourceOrder, sourceGoodsId, sourceSku.getNum())) {
|
|
|
+ throw BusinessRuntimeException.getInstance("当前车票不符合领取条件");
|
|
|
+ }
|
|
|
+
|
|
|
Integer receivedCount = ticketRedemptionCodeRecordMapper.selectCount(Wrappers.lambdaQuery(TicketRedemptionCodeRecord.class)
|
|
|
.in(TicketRedemptionCodeRecord::getUserId, userIds)
|
|
|
.eq(TicketRedemptionCodeRecord::getSkuId, Constant.GPT_ACTIVITY_GIFT_SKU_ID)
|
|
|
@@ -2861,10 +2862,13 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private boolean isGptApiQuotaSourceTicket(Long goodsId, Integer skuNum) {
|
|
|
- return Constant.GPT_RECHARGE_GOODS_ID.equals(goodsId)
|
|
|
- || (Constant.GPT_PLUS_GID.equals(goodsId) && Objects.equals(skuNum, 1));
|
|
|
- }
|
|
|
+ private boolean isGptApiQuotaSourceTicket(OrderDon orderDon, Long goodsId, Integer skuNum) {
|
|
|
+ if (orderDon == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return (Constant.GPT_RECHARGE_GOODS_ID.equals(goodsId)
|
|
|
+ || (Constant.GPT_PLUS_GID.equals(goodsId) && Objects.equals(skuNum, 1)) && orderDon.getCreatedTime().after(DateUtil.parse("2026-05-03")));
|
|
|
+ }
|
|
|
|
|
|
private GroupsRelation getReusableGptActivityGiftRelation(List<Long> userIds, Long giftSkuId, Long sourceGoodsId) {
|
|
|
TicketRedemptionCodeRecord retryRecord = ticketRedemptionCodeRecordMapper.selectOne(Wrappers.lambdaQuery(TicketRedemptionCodeRecord.class)
|