|
@@ -597,15 +597,13 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
studentPaymentOrder.setVersion(0);
|
|
studentPaymentOrder.setVersion(0);
|
|
studentPaymentOrder.setCalenderId(calenderId);
|
|
studentPaymentOrder.setCalenderId(calenderId);
|
|
studentPaymentOrderService.insert(studentPaymentOrder);
|
|
studentPaymentOrderService.insert(studentPaymentOrder);
|
|
- // 订单详情
|
|
|
|
|
|
+
|
|
|
|
+ // 拆分各商品,如果有优惠券则计算使用券后的金额,并写入订单详情
|
|
studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration, studentPaymentOrder, goodsDto, renewParamDto, couponPayParam);
|
|
studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration, studentPaymentOrder, goodsDto, renewParamDto, couponPayParam);
|
|
- //goodsDto.getOrderAmount 真实的原价 - 优惠的钱 = 本次订单应付的钱
|
|
|
|
- BigDecimal actualAmount = goodsDto.getOrderAmount().subtract(studentPaymentOrder.getCouponRemitFee());
|
|
|
|
- //+ 课程优惠的钱(如果课程是送的那么加上)
|
|
|
|
- if (Objects.nonNull(goodsDto.getCourseRemitFee())) {
|
|
|
|
- actualAmount = actualAmount.add(goodsDto.getCourseRemitFee());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ //goodsDto.getOrderAmount 真实的原价(已经扣减了送课的钱) - 优惠券的钱 = 本次订单应付的钱
|
|
|
|
+ BigDecimal actualAmount = goodsDto.getOrderAmount()
|
|
|
|
+ .subtract(studentPaymentOrder.getCouponRemitFee());
|
|
//前端获取的价格
|
|
//前端获取的价格
|
|
BigDecimal amount = renewParamDto.getAmount();
|
|
BigDecimal amount = renewParamDto.getAmount();
|
|
//校验 页面传入的价格 和 (本次原价-优惠价后的价格) 是否一致
|
|
//校验 页面传入的价格 和 (本次原价-优惠价后的价格) 是否一致
|
|
@@ -837,13 +835,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
// 拆分各商品,如果有优惠券则计算使用券后的金额,并写入订单详情
|
|
// 拆分各商品,如果有优惠券则计算使用券后的金额,并写入订单详情
|
|
studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration, studentPaymentOrder, goodsDto, registerPayDto, couponPayParam);
|
|
studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration, studentPaymentOrder, goodsDto, registerPayDto, couponPayParam);
|
|
- //goodsDto.getOrderAmount 真实的原价 - 优惠的钱 = 本次订单应付的钱
|
|
|
|
|
|
+ //goodsDto.getOrderAmount 真实的原价(已经扣减了送课的钱) - 优惠券的钱 = 本次订单应付的钱
|
|
BigDecimal actualAmount = goodsDto.getOrderAmount()
|
|
BigDecimal actualAmount = goodsDto.getOrderAmount()
|
|
.subtract(studentPaymentOrder.getCouponRemitFee());
|
|
.subtract(studentPaymentOrder.getCouponRemitFee());
|
|
- //+ 课程优惠的钱(如果课程是送的那么加上)
|
|
|
|
- if (Objects.nonNull(goodsDto.getCourseRemitFee())) {
|
|
|
|
- actualAmount = actualAmount.add(goodsDto.getCourseRemitFee());
|
|
|
|
- }
|
|
|
|
|
|
|
|
//前端获取的价格
|
|
//前端获取的价格
|
|
BigDecimal amount = registerPayDto.getAmount();
|
|
BigDecimal amount = registerPayDto.getAmount();
|