|
@@ -70,6 +70,7 @@ import com.cyksj.service.order.OrderDonService;
|
|
|
import com.cyksj.service.pay.AliPayCommonService;
|
|
import com.cyksj.service.pay.AliPayCommonService;
|
|
|
import com.cyksj.service.relation.GroupRelationClearService;
|
|
import com.cyksj.service.relation.GroupRelationClearService;
|
|
|
import com.cyksj.service.relation.GroupRelationFrontService;
|
|
import com.cyksj.service.relation.GroupRelationFrontService;
|
|
|
|
|
+import com.cyksj.service.relation.GroupsRelationExpiryRecordService;
|
|
|
import com.cyksj.service.sys.SysConfigService;
|
|
import com.cyksj.service.sys.SysConfigService;
|
|
|
import com.cyksj.service.template.TemplateCommonService;
|
|
import com.cyksj.service.template.TemplateCommonService;
|
|
|
import com.cyksj.service.user.UserBenefitsService;
|
|
import com.cyksj.service.user.UserBenefitsService;
|
|
@@ -209,6 +210,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
|
|
|
|
|
private final ChannelPopularizeMapper channelPopularizeMapper;
|
|
private final ChannelPopularizeMapper channelPopularizeMapper;
|
|
|
|
|
|
|
|
|
|
+ private final GroupsRelationExpiryRecordService groupsRelationExpiryRecordService;
|
|
|
|
|
+
|
|
|
private final List<String> noChekGoodsTemp = List.of("Apple One", "Youtube", "Spotify");
|
|
private final List<String> noChekGoodsTemp = List.of("Apple One", "Youtube", "Spotify");
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
@@ -2102,6 +2105,38 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
//修改车位状态并发送模板消息
|
|
//修改车位状态并发送模板消息
|
|
|
updateCarParkAndSendMsg(goodsDon, sku, orderDon);
|
|
updateCarParkAndSendMsg(goodsDon, sku, orderDon);
|
|
|
}
|
|
}
|
|
|
|
|
+ //同步车票是否重购 记录
|
|
|
|
|
+ TASK_POOL.execute(() -> {
|
|
|
|
|
+ List<Long> userIdList = userBindRelationService.getRelationUserIdList(orderDon.getUserId(), null);
|
|
|
|
|
+ GroupsRelationExpiryRecord groupsRelationExpiryRecord = groupsRelationExpiryRecordService.getOne(Wrappers.lambdaQuery(GroupsRelationExpiryRecord.class)
|
|
|
|
|
+ .in(GroupsRelationExpiryRecord::getUserId, userIdList)
|
|
|
|
|
+ .eq(GroupsRelationExpiryRecord::getRelationId, orderDon.getRelationId()).last("limit 1"));
|
|
|
|
|
+ if (groupsRelationExpiryRecord == null) {
|
|
|
|
|
+ List<GroupsRelationExpiryRecord> groupsRelationExpiryRecords = groupsRelationExpiryRecordService.list(Wrappers.lambdaQuery(GroupsRelationExpiryRecord.class)
|
|
|
|
|
+ .in(GroupsRelationExpiryRecord::getUserId, userIdList)
|
|
|
|
|
+ .eq(GroupsRelationExpiryRecord::getGoodsId, orderDon.getGoodsId()));
|
|
|
|
|
+ if (CollUtil.isNotEmpty(groupsRelationExpiryRecords)) {
|
|
|
|
|
+ groupsRelationExpiryRecords.forEach(data -> {
|
|
|
|
|
+ data.setReBuyGoodsId(goodsDon.getId());
|
|
|
|
|
+ data.setReBuyGoodsTitle(goodsDon.getTitle());
|
|
|
|
|
+ data.setReBuySkuId(sku.getId());
|
|
|
|
|
+ data.setReBuySpecVal(sku.getSpecVal());
|
|
|
|
|
+ data.setReBuyOrderId(orderDon.getId());
|
|
|
|
|
+ data.setIsReBuy(true);
|
|
|
|
|
+ });
|
|
|
|
|
+ groupsRelationExpiryRecordService.saveOrUpdateBatch(groupsRelationExpiryRecords);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (groupsRelationExpiryRecord != null) {
|
|
|
|
|
+ groupsRelationExpiryRecord.setReBuyGoodsId(goodsDon.getId());
|
|
|
|
|
+ groupsRelationExpiryRecord.setReBuyGoodsTitle(goodsDon.getTitle());
|
|
|
|
|
+ groupsRelationExpiryRecord.setReBuySkuId(sku.getId());
|
|
|
|
|
+ groupsRelationExpiryRecord.setReBuySpecVal(sku.getSpecVal());
|
|
|
|
|
+ groupsRelationExpiryRecord.setReBuyOrderId(orderDon.getId());
|
|
|
|
|
+ groupsRelationExpiryRecord.setIsReBuy(true);
|
|
|
|
|
+ groupsRelationExpiryRecordService.saveOrUpdate(groupsRelationExpiryRecord);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|