|
|
@@ -431,14 +431,6 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
if (payRequest.getPopularizeId() != null) {
|
|
|
orderDon.setPopularizeId(payRequest.getPopularizeId());
|
|
|
}
|
|
|
- if (sku != null) {
|
|
|
- //扣除使用优惠券、余额的订单金额
|
|
|
- deductOrderMoney(orderDon, couponUser, payRequest.getBalance(), user, sku.getPrice(), goodsDon.getType(), payRequest.getGcCash(), payRequest.getGcpIds(), payRequest.getIsAcReduce());
|
|
|
- }
|
|
|
-
|
|
|
- if (isSpecificPrice && (orderDon.getMoney().compareTo(BigDecimal.ZERO) == 0 || orderDon.getMoney().compareTo(specificPrice) != 0)) {
|
|
|
- throw BusinessRuntimeException.getInstance("专属价格不支持使用其他优惠");
|
|
|
- }
|
|
|
|
|
|
orderDon.setSkuId(payRequest.getSkuId());
|
|
|
orderDon.setRelationId(relationId);
|
|
|
@@ -465,6 +457,14 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
throw BusinessRuntimeException.getInstance("车位与车队规格不一致");
|
|
|
}
|
|
|
}
|
|
|
+ if (sku != null) {
|
|
|
+ //扣除使用优惠券、余额的订单金额
|
|
|
+ deductOrderMoney(orderDon, couponUser, payRequest.getBalance(), user, sku.getPrice(), goodsDon.getType(), payRequest.getGcCash(), payRequest.getGcpIds(), payRequest.getIsAcReduce());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isSpecificPrice && (orderDon.getMoney().compareTo(BigDecimal.ZERO) == 0 || orderDon.getMoney().compareTo(specificPrice) != 0)) {
|
|
|
+ throw BusinessRuntimeException.getInstance("专属价格不支持使用其他优惠");
|
|
|
+ }
|
|
|
orderDon.setPayDesc(goodsDon.getPayDesc());
|
|
|
StringBuilder payTitle = new StringBuilder();
|
|
|
payTitle.append(goodsDon.getTitle());
|
|
|
@@ -2733,10 +2733,13 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
|
DateTime now = DateTime.now();
|
|
|
EquipmentActivityReduce equipmentActivityReduce = equipmentActivityReduceMapper.selectOne(Wrappers.lambdaQuery(EquipmentActivityReduce.class)
|
|
|
- .ge(EquipmentActivityReduce::getSt, now)
|
|
|
- .lt(EquipmentActivityReduce::getEt, now)
|
|
|
+ .le(EquipmentActivityReduce::getSt, now)
|
|
|
+ .gt(EquipmentActivityReduce::getEt, now)
|
|
|
.eq(EquipmentActivityReduce::getDeleted, true)
|
|
|
.last("limit 1"));
|
|
|
+ if (equipmentActivityReduce == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
BigDecimal money = orderDon.getMoney();
|
|
|
BigDecimal acReduceMoney = BigDecimal.ZERO;
|
|
|
if (money.compareTo(Constant.FIVE_HUNDRED) >= 0 && money.compareTo(Constant.THOUSAND) < 0) {
|