套餐进位
This commit is contained in:
parent
8af7806a7c
commit
08e9bd1d01
|
@ -268,7 +268,7 @@ public class UserPackageOrderServiceImpl extends ServiceImpl<UserPackageOrderDao
|
|||
BigDecimal vipMoney = canVipMoney;
|
||||
BigDecimal unCanVipMoney = totalMoney.subtract(canVipMoney);//非会员优惠金额
|
||||
canVipMoney = canVipMoney.multiply(userPackageOrder.getVipRate()).divide(new BigDecimal(100));//对可用vip的金额进行优惠
|
||||
canVipMoney = canVipMoney.setScale(0,BigDecimal.ROUND_UP);
|
||||
canVipMoney = canVipMoney.setScale(0,BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal vipReductionMoney = vipMoney.subtract(canVipMoney);
|
||||
userPackageOrder.setVipReductionMoney(vipReductionMoney);//会员减免金额
|
||||
totalMoney = canVipMoney.add(unCanVipMoney);//优惠后的总金额
|
||||
|
@ -400,7 +400,7 @@ public class UserPackageOrderServiceImpl extends ServiceImpl<UserPackageOrderDao
|
|||
BigDecimal vipMoney = canVipMoney;
|
||||
BigDecimal unCanVipMoney = totalMoney.subtract(canVipMoney);//非会员优惠金额
|
||||
canVipMoney = canVipMoney.multiply(userPackageOrder.getVipRate()).divide(new BigDecimal(100));//对可用vip的金额进行优惠
|
||||
canVipMoney = canVipMoney.setScale(0,BigDecimal.ROUND_UP);
|
||||
canVipMoney = canVipMoney.setScale(0,BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal vipReductionMoney = vipMoney.subtract(canVipMoney);
|
||||
userPackageOrder.setVipReductionMoney(vipReductionMoney);//会员减免金额
|
||||
totalMoney = canVipMoney.add(unCanVipMoney);//优惠后的总金额
|
||||
|
@ -711,7 +711,7 @@ public class UserPackageOrderServiceImpl extends ServiceImpl<UserPackageOrderDao
|
|||
for (UserPackageOrdersMapping ordersPackage : ordersPackageList) {
|
||||
MassagePackage massagePackage = massagePackageService.getById(ordersPackage.getPackageId());
|
||||
BigDecimal sum = massagePackage.getPrice().multiply(new BigDecimal(ordersPackage.getNum()));
|
||||
sum = sum.setScale(0,BigDecimal.ROUND_UP);
|
||||
sum = sum.setScale(0,BigDecimal.ROUND_HALF_UP);
|
||||
if(massagePackage.getIsCanCoupon() == 1){
|
||||
canCouponMoney = canCouponMoney.add(sum);
|
||||
}
|
||||
|
@ -783,7 +783,7 @@ public class UserPackageOrderServiceImpl extends ServiceImpl<UserPackageOrderDao
|
|||
BigDecimal vipMoney = canVipMoney;
|
||||
BigDecimal unCanVipMoney = totalMoney.subtract(canVipMoney);//非会员优惠金额
|
||||
canVipMoney = canVipMoney.multiply(userPackageOrder.getVipRate()).divide(new BigDecimal(100));//对可用vip的金额进行优惠
|
||||
canVipMoney = canVipMoney.setScale(0,BigDecimal.ROUND_UP);
|
||||
canVipMoney = canVipMoney.setScale(0,BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal vipReductionMoney = vipMoney.subtract(canVipMoney);
|
||||
userPackageOrder.setVipReductionMoney(vipReductionMoney);//会员减免金额
|
||||
totalMoney = canVipMoney.add(unCanVipMoney);//优惠后的总金额
|
||||
|
@ -994,7 +994,7 @@ public class UserPackageOrderServiceImpl extends ServiceImpl<UserPackageOrderDao
|
|||
for (UserPackageOrdersMapping ordersPackage : ordersPackageList) {
|
||||
MassagePackage massagePackage = massagePackageService.getById(ordersPackage.getPackageId());
|
||||
BigDecimal sum = massagePackage.getPrice().multiply(new BigDecimal(ordersPackage.getNum()));
|
||||
sum = sum.setScale(0,BigDecimal.ROUND_UP);
|
||||
sum = sum.setScale(0,BigDecimal.ROUND_HALF_UP);
|
||||
if(massagePackage.getIsCanCoupon() == 1){
|
||||
canCouponMoney = canCouponMoney.add(sum);
|
||||
}
|
||||
|
@ -1065,7 +1065,7 @@ public class UserPackageOrderServiceImpl extends ServiceImpl<UserPackageOrderDao
|
|||
BigDecimal vipMoney = canVipMoney;
|
||||
BigDecimal unCanVipMoney = totalMoney.subtract(canVipMoney);//非会员优惠金额
|
||||
canVipMoney = canVipMoney.multiply(userPackageOrder.getVipRate()).divide(new BigDecimal(100));//对可用vip的金额进行优惠
|
||||
canVipMoney = canVipMoney.setScale(0,BigDecimal.ROUND_UP);
|
||||
canVipMoney = canVipMoney.setScale(0,BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal vipReductionMoney = vipMoney.subtract(canVipMoney);
|
||||
userPackageOrder.setVipReductionMoney(vipReductionMoney);//会员减免金额
|
||||
totalMoney = canVipMoney.add(unCanVipMoney);//优惠后的总金额
|
||||
|
|
Loading…
Reference in New Issue