Commit 3127efba by huluobin

异常

parent 4e21af2f
......@@ -461,12 +461,16 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
.filter(couponCustomerRelevance -> couponCustomerRelevance.getDiscountAmount().compareTo(orderManage.getTotalPaymentAmount()) <= 0)
.findAny()
.ifPresent(couponCustomerRelevance -> {
marketService.setUpInnerCoupon(SetUpInnerCouponCommand.builder()
.orderId(orderId)
.innerCouponCustomerRelevanceIds(Lists.newArrayList(couponCustomerRelevance.getId()))
.build());
//结算订单
marketService.calcOrderAmount(orderId);
try {
marketService.setUpInnerCoupon(SetUpInnerCouponCommand.builder()
.orderId(orderId)
.innerCouponCustomerRelevanceIds(Lists.newArrayList(couponCustomerRelevance.getId()))
.build());
//结算订单
marketService.calcOrderAmount(orderId);
} catch (Exception e) {
log.error(e.getMessage());
}
});
pushMsgService.sendOrderPayNotifyMsg(orderId,
......
......@@ -1513,11 +1513,12 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
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.setDiscountRate(leisureDiscountConfig.getDiscountRate());
orderServe.setLeisureDiscountConfigId(scheduleServeVar.getLeisureDiscountConfigId());
orderServe.setDiscountRate(scheduleServeVar.getDiscountRate());
orderServe.setLeisurePrice(scheduleServeVar.getLeisurePrice());
//更新订单实际折扣的使用次数
leisureDiscountConfig.setLeftTimes(leisureDiscountConfig.getLeftTimes() - 1);
......
......@@ -218,8 +218,10 @@ public class OrderServe implements Serializable {
@TableField(strategy = FieldStrategy.IGNORED)
private Integer producePromotionTimeId;
@ApiModelProperty("折扣")
private BigDecimal discountRate;
@ApiModelProperty("闲时价格")
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