|
@@ -166,6 +166,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
|
|
|
|
|
private final TemplateCommonService templateCommonService;
|
|
private final TemplateCommonService templateCommonService;
|
|
|
|
|
|
|
|
|
|
+ private final List<String> noChekGoodsTemp = List.of("Apple One", "Youtube", "Spotify");
|
|
|
|
|
+
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
|
@Override
|
|
@Override
|
|
|
public OrderDon submit(OrderPayRequest payRequest) throws Exception {
|
|
public OrderDon submit(OrderPayRequest payRequest) throws Exception {
|
|
@@ -587,11 +589,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
}
|
|
|
GroupsTrips groupsTrips = groupsMapper.selectById(relation.getGroupsId());
|
|
GroupsTrips groupsTrips = groupsMapper.selectById(relation.getGroupsId());
|
|
|
|
|
|
|
|
- if (GroupsTrips.Status.waiting.equals(groupsTrips.getStatus())) {
|
|
|
|
|
- throw new BusinessRuntimeException("亲,该车次还未发车,需等待客服发车才能续费哦.");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
GoodsDon goodsDon = goodsDonMapper.selectById(sku.getGoodsId());
|
|
GoodsDon goodsDon = goodsDonMapper.selectById(sku.getGoodsId());
|
|
|
|
|
+
|
|
|
if (goodsDon == null || !goodsDon.getStatus()) {
|
|
if (goodsDon == null || !goodsDon.getStatus()) {
|
|
|
throw new BusinessRuntimeException("商品已下架");
|
|
throw new BusinessRuntimeException("商品已下架");
|
|
|
}
|
|
}
|
|
@@ -600,6 +599,12 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
throw new BusinessRuntimeException("实物不支持续费");
|
|
throw new BusinessRuntimeException("实物不支持续费");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (GroupsTrips.Status.waiting.equals(groupsTrips.getStatus())) {
|
|
|
|
|
+ if (!noChekGoodsTemp.contains(goodsDon.getTitle())) {
|
|
|
|
|
+ throw new BusinessRuntimeException("亲,该车次还未发车,需等待客服发车才能续费哦.");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
String payOpenId = user.getOpenId();
|
|
String payOpenId = user.getOpenId();
|
|
|
|
|
|
|
|
/* 生成订单 */
|
|
/* 生成订单 */
|