|
|
@@ -218,6 +218,9 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
OrderDon orderDon = new OrderDon();
|
|
|
orderDon.setOrderNo(donNo);
|
|
|
orderDon.setOpenId(payOpenId);
|
|
|
+ if (sku.getPrice() != null && payRequest.getDonMoney().compareTo(sku.getPrice()) < 0) {
|
|
|
+ throw BusinessRuntimeException.getInstance("车位所付金额错误");
|
|
|
+ }
|
|
|
orderDon.setMoney(payRequest.getDonMoney());
|
|
|
orderDon.setRealMoney(payRequest.getDonMoney());
|
|
|
//存在优惠券
|
|
|
@@ -244,6 +247,10 @@ 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("车位与车队规格不一致");
|
|
|
+ }
|
|
|
this.saveOrUpdate(orderDon);
|
|
|
|
|
|
if (goodsDon.getType() == 2) {
|
|
|
@@ -530,6 +537,10 @@ 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("车位与车队规格不一致");
|
|
|
+ }
|
|
|
this.saveOrUpdate(orderDon);
|
|
|
|
|
|
jobManager.addJob(EXPIRY_TIME, () -> {
|