订单项目价格调回,价格*技师加成*vip优化比

This commit is contained in:
曹磊 2024-07-17 09:59:23 +08:00
parent 349f74140f
commit f6ff32fe71
1 changed files with 13 additions and 13 deletions

View File

@ -764,13 +764,13 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
orders.setPriceMarkup(priceMarkup);
//会员优惠后金额及会员减免金额
BigDecimal vipMoney = price.multiply(orders.getVipRate()).divide(new BigDecimal(100));
BigDecimal vipMoney = priceMarkup.multiply(orders.getVipRate()).divide(new BigDecimal(100));
vipMoney = vipMoney.setScale(0,BigDecimal.ROUND_UP);
BigDecimal vipReductionMoney = price.subtract(vipMoney);
BigDecimal vipReductionMoney = priceMarkup.subtract(vipMoney);
orders.setVipReductionMoney(vipReductionMoney);
//项目价格 = 原金额+技师加成金额-会员减免金额
BigDecimal payMoney = price.add(technicianMoney).subtract(vipReductionMoney).setScale(0,BigDecimal.ROUND_UP);
BigDecimal payMoney = vipMoney;
orders.setMassageMoney(payMoney);
//判断金额是否满足代金券金额最少消费额度
@ -1492,9 +1492,9 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
orders.setPriceMarkup(priceMarkup);
//会员优惠后金额及会员减免金额
BigDecimal vipMoney = price.multiply(orders.getVipRate()).divide(new BigDecimal(100));
BigDecimal vipMoney = priceMarkup.multiply(orders.getVipRate()).divide(new BigDecimal(100));
vipMoney = vipMoney.setScale(0,BigDecimal.ROUND_UP);
BigDecimal vipReductionMoney = price.subtract(vipMoney);
BigDecimal vipReductionMoney = priceMarkup.subtract(vipMoney);
// orders.setVipReductionMoney(vipReductionMoney);
BigDecimal chajia = orders.getMassagePrice().subtract(oldOrders.getMassagePrice());
@ -1503,13 +1503,13 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
chajiaTechnicianMoney = chajiaTechnicianMoney.setScale(0,BigDecimal.ROUND_UP);
orders.setTechnicianMoney(chajiaTechnicianMoney);
BigDecimal chajiaVipMoney = chajia.multiply(orders.getVipRate()).divide(new BigDecimal(100));
BigDecimal chajiaVipMoney = chajiaTechnicianMoney.multiply(orders.getVipRate()).divide(new BigDecimal(100));
chajiaVipMoney = chajiaVipMoney.setScale(0,BigDecimal.ROUND_UP);
BigDecimal chajiaVipReductionMoney = chajia.subtract(chajiaVipMoney);
BigDecimal chajiaVipReductionMoney = chajiaTechnicianMoney.subtract(chajiaVipMoney);
orders.setVipReductionMoney(chajiaVipReductionMoney);
//项目价格 = 原金额+技师加成金额-会员减免金额
BigDecimal massagePrice = chajia.add(chajiaTechnicianMoney).subtract(chajiaVipReductionMoney).setScale(0,BigDecimal.ROUND_UP);
//项目价格 = 会员金额
BigDecimal massagePrice = chajiaVipMoney;
orders.setMassageMoney(massagePrice);
orders.setPayMoney(massagePrice);//差价
@ -1659,13 +1659,13 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
orders.setPriceMarkup(priceMarkup);
//会员优惠后金额及会员减免金额
BigDecimal vipMoney = price.multiply(orders.getVipRate()).divide(new BigDecimal(100));
BigDecimal vipMoney = priceMarkup.multiply(orders.getVipRate()).divide(new BigDecimal(100));
vipMoney = vipMoney.setScale(0,BigDecimal.ROUND_UP);
BigDecimal vipReductionMoney = price.subtract(vipMoney);
BigDecimal vipReductionMoney = priceMarkup.subtract(vipMoney);
orders.setVipReductionMoney(vipReductionMoney);
//项目价格 = 原金额+技师加成金额-会员减免金额
BigDecimal payMoney = price.add(technicianMoney).subtract(vipReductionMoney).setScale(0,BigDecimal.ROUND_UP);
//项目价格 = 会员金额
BigDecimal payMoney = vipMoney;
orders.setMassageMoney(payMoney);
//项目差价