|
|
@@ -356,7 +356,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
|
this.saveOrUpdate(orderDon);
|
|
|
|
|
|
- if (Constant.realGoodsType.contains(goodsDon.getType())) {
|
|
|
+ if (Constant.realGoodsType.contains(goodsDon.getType()) && !goodsDon.getId().equals(27l)) {
|
|
|
saveTransport(payRequest.getAddressId(), orderDon.getId());
|
|
|
}
|
|
|
if (isNew) {
|
|
|
@@ -2160,6 +2160,14 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
*/
|
|
|
private void sendMidjourneyTicketIfCourse(Long userId) {
|
|
|
Optional.ofNullable(goodsDonSkuMapper.selectById(185))
|
|
|
- .ifPresent(sku -> exchangeCodeService.getRelationNoOrder(sku, userId));
|
|
|
+ .ifPresent(sku -> {
|
|
|
+ GroupsRelation relation = exchangeCodeService.getRelationNoOrder(sku, userId);
|
|
|
+ if (relation.getExpiryTime() == null || relation.getStartTime() == null) {
|
|
|
+ DateTime now = DateTime.now();
|
|
|
+ relation.setStartTime(now);
|
|
|
+ relation.setExpiryTime(DateUtil.offsetMonth(now, sku.getMonths() * 1));
|
|
|
+ groupsRelationMapper.updateById(relation);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|