Commit 3127efba by huluobin

异常

parent 4e21af2f
...@@ -461,12 +461,16 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order ...@@ -461,12 +461,16 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
.filter(couponCustomerRelevance -> couponCustomerRelevance.getDiscountAmount().compareTo(orderManage.getTotalPaymentAmount()) <= 0) .filter(couponCustomerRelevance -> couponCustomerRelevance.getDiscountAmount().compareTo(orderManage.getTotalPaymentAmount()) <= 0)
.findAny() .findAny()
.ifPresent(couponCustomerRelevance -> { .ifPresent(couponCustomerRelevance -> {
marketService.setUpInnerCoupon(SetUpInnerCouponCommand.builder() try {
.orderId(orderId) marketService.setUpInnerCoupon(SetUpInnerCouponCommand.builder()
.innerCouponCustomerRelevanceIds(Lists.newArrayList(couponCustomerRelevance.getId())) .orderId(orderId)
.build()); .innerCouponCustomerRelevanceIds(Lists.newArrayList(couponCustomerRelevance.getId()))
//结算订单 .build());
marketService.calcOrderAmount(orderId); //结算订单
marketService.calcOrderAmount(orderId);
} catch (Exception e) {
log.error(e.getMessage());
}
}); });
pushMsgService.sendOrderPayNotifyMsg(orderId, pushMsgService.sendOrderPayNotifyMsg(orderId,
......
...@@ -1513,11 +1513,12 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1513,11 +1513,12 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
if (leisureDiscountConfig != null) { if (leisureDiscountConfig != null) {
//折扣金额 //折扣金额
BigDecimal leisureDiscountPrice = orderServe.getPrice().subtract(orderServe.getPrice().multiply(leisureDiscountConfig.getDiscountRate())); BigDecimal leisurePrice = orderServe.getPrice().subtract(orderServe.getPrice().multiply(leisureDiscountConfig.getDiscountRate()));
//设置折扣属性 //设置折扣属性
orderServe.setLeisureDiscountConfigId(leisureDiscountConfig.getId()); orderServe.setLeisureDiscountConfigId(scheduleServeVar.getLeisureDiscountConfigId());
orderServe.setDiscountRate(leisureDiscountConfig.getDiscountRate()); orderServe.setDiscountRate(scheduleServeVar.getDiscountRate());
orderServe.setLeisurePrice(scheduleServeVar.getLeisurePrice());
//更新订单实际折扣的使用次数 //更新订单实际折扣的使用次数
leisureDiscountConfig.setLeftTimes(leisureDiscountConfig.getLeftTimes() - 1); leisureDiscountConfig.setLeftTimes(leisureDiscountConfig.getLeftTimes() - 1);
......
...@@ -218,8 +218,10 @@ public class OrderServe implements Serializable { ...@@ -218,8 +218,10 @@ public class OrderServe implements Serializable {
@TableField(strategy = FieldStrategy.IGNORED) @TableField(strategy = FieldStrategy.IGNORED)
private Integer producePromotionTimeId; private Integer producePromotionTimeId;
@ApiModelProperty("折扣")
private BigDecimal discountRate; private BigDecimal discountRate;
@ApiModelProperty("闲时价格")
private BigDecimal leisurePrice; private BigDecimal leisurePrice;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment