|
|
@@ -247,9 +247,11 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
orderDon.setStatus(OrderDon.Status.noPayment);
|
|
|
orderDon.setUserId(user.getId());
|
|
|
orderDon.setType(OrderDon.Type.getType(payRequest.getType()));
|
|
|
- Long gtSkuId = groupsRelationMapper.getGroupTripsSkuIdByRelationId(relationId);
|
|
|
- if (!gtSkuId.equals(orderDon.getSkuId())) {
|
|
|
- throw BusinessRuntimeException.getInstance("车位与车队规格不一致");
|
|
|
+ if (relationId != 0) {
|
|
|
+ Long gtSkuId = groupsRelationMapper.getGroupTripsSkuIdByRelationId(relationId);
|
|
|
+ if (!gtSkuId.equals(orderDon.getSkuId())) {
|
|
|
+ throw BusinessRuntimeException.getInstance("车位与车队规格不一致");
|
|
|
+ }
|
|
|
}
|
|
|
this.saveOrUpdate(orderDon);
|
|
|
|
|
|
@@ -537,10 +539,13 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
orderDon.setCouponMoney(couponMoney);
|
|
|
orderDon.setCouponUserId(couponUser.getId());
|
|
|
}
|
|
|
- Long gtSkuId = groupsRelationMapper.getGroupTripsSkuIdByRelationId(relationId);
|
|
|
- if (!gtSkuId.equals(orderDon.getSkuId())) {
|
|
|
- throw BusinessRuntimeException.getInstance("车位与车队规格不一致");
|
|
|
+ if (relationId != 0) {
|
|
|
+ Long gtSkuId = groupsRelationMapper.getGroupTripsSkuIdByRelationId(relationId);
|
|
|
+ if (!gtSkuId.equals(orderDon.getSkuId())) {
|
|
|
+ throw BusinessRuntimeException.getInstance("车位与车队规格不一致");
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
this.saveOrUpdate(orderDon);
|
|
|
|
|
|
jobManager.addJob(EXPIRY_TIME, () -> {
|