|
|
@@ -2816,7 +2816,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
GoodsDonSku giftSku = goodsDonSkuMapper.selectById(Constant.GPT_ACTIVITY_GIFT_SKU_ID);
|
|
|
GroupsRelation giftRelation = null;
|
|
|
try {
|
|
|
- giftRelation = getReusableGptActivityGiftRelation(userIds, giftSku.getId());
|
|
|
+ giftRelation = getReusableGptActivityGiftRelation(userIds, giftSku.getId(), sourceGoodsId);
|
|
|
if (giftRelation == null) {
|
|
|
Long giftRelationId = getTicket(userId, giftSku.getId(), Boolean.FALSE);
|
|
|
if (giftRelationId == null) {
|
|
|
@@ -2866,10 +2866,11 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
|| (Constant.GPT_PLUS_GID.equals(goodsId) && Objects.equals(skuNum, 1));
|
|
|
}
|
|
|
|
|
|
- private GroupsRelation getReusableGptActivityGiftRelation(List<Long> userIds, Long giftSkuId) {
|
|
|
+ private GroupsRelation getReusableGptActivityGiftRelation(List<Long> userIds, Long giftSkuId, Long sourceGoodsId) {
|
|
|
TicketRedemptionCodeRecord retryRecord = ticketRedemptionCodeRecordMapper.selectOne(Wrappers.lambdaQuery(TicketRedemptionCodeRecord.class)
|
|
|
.in(TicketRedemptionCodeRecord::getUserId, userIds)
|
|
|
.eq(TicketRedemptionCodeRecord::getSkuId, giftSkuId)
|
|
|
+ .eq(TicketRedemptionCodeRecord::getSourceGoodsId, sourceGoodsId)
|
|
|
.eq(TicketRedemptionCodeRecord::getSourceType, RedisKey.GPT_API_QUOTA_KEY)
|
|
|
.eq(TicketRedemptionCodeRecord::getStatus, "error")
|
|
|
.isNotNull(TicketRedemptionCodeRecord::getRelationId)
|