| | |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | | vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP)); |
| | | vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP)); |
| | | |
| | | vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP)); |
| | | }else{ |
| | | //设置优惠前小计,优惠前小计=售价* 商品数量 |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | | vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP)); |
| | | vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP)); |
| | | vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP)); |
| | | }else{ |
| | | //设置优惠前小计,优惠前小计=售价* 商品数量 |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | | vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP)); |
| | | vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP)); |
| | | vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP)); |
| | | }else{ |
| | | //设置优惠前小计,优惠前小计=售价* 商品数量 |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | | vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP)); |
| | | vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP)); |
| | | vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP)); |
| | | }else{ |
| | | //设置优惠前小计,优惠前小计=售价* 商品数量 |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |
| | | vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP)); |
| | | vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP)); |
| | | vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP)); |
| | | }else{ |
| | | //设置优惠前小计,优惠前小计=售价* 商品数量 |
| | | vo.setTotal(vo.getCurPrice().multiply(buyNum)); |