|
@@ -392,6 +392,7 @@ public class OrderHandler {
|
|
|
String brushelEment = systemService.selectOneShopRuleById(253).getRuleDesc();
|
|
|
|
|
|
int brushelTotal = 0; // 牙刷总金额
|
|
|
+ int brushHeadTotal = 0; // 刷头总金额
|
|
|
int brushelCouponTotal = 0; //优惠总价
|
|
|
|
|
|
int total = 0; // 需要支付的总额, 单位为分
|
|
@@ -430,12 +431,12 @@ public class OrderHandler {
|
|
|
if(cartDto.getProductType() == Integer.valueOf(brushelEl)){ //判断订单中是否有刷头,有刷头 brushFlag 为true;
|
|
|
brush1Flag = true;
|
|
|
brush2Flag = true;
|
|
|
+ brushHeadTotal += subTotal;
|
|
|
if(brushelCouponTotal == 0 || brushelCouponTotal < cartDto.getProductPrice()){
|
|
|
brushelCouponTotal = cartDto.getProductPrice();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}else if(cartDto.getProductStatus().intValue() != 1){
|
|
|
msg.setMessage(ResultInfo.cartNoStatusError);
|
|
|
return msg;
|
|
@@ -512,11 +513,11 @@ public class OrderHandler {
|
|
|
total = total - brushelCouponTotal;
|
|
|
}else if(couponItemDto.getCouponIsNewPeople() == 1 && couponItemDto.getCouponId() ==40000){ ////当券 新人卷 60元优惠券
|
|
|
int br = 0;
|
|
|
- br = brushelTotal - couponType.getCouponReduce(); //刷头总价减去优惠券金额 小于零(只需要减去刷头总价) 大于零(需要减去优惠券总价)
|
|
|
+ br = brushHeadTotal - couponType.getCouponReduce(); //刷头总价减去优惠券金额 小于零(只需要减去刷头总价) 大于零(需要减去优惠券总价)
|
|
|
if(br <= 0){
|
|
|
- total=total-brushelTotal;
|
|
|
+ total = total - brushHeadTotal;
|
|
|
}else{
|
|
|
- total=total-couponType.getCouponReduce();
|
|
|
+ total = total - couponType.getCouponReduce();
|
|
|
}
|
|
|
}else{
|
|
|
total=total-couponType.getCouponReduce();
|