售后申请bug修复
This commit is contained in:
@ -86,7 +86,17 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
|
||||
//商品优惠前总金额
|
||||
BigDecimal totalAmountOfGoods = NumberUtil.mul(cartInfo.getTruePrice(), cartInfo.getCartNum());
|
||||
//商品优惠总金额
|
||||
BigDecimal commodityDiscountAmount = NumberUtil.mul(NumberUtil.div(totalAmountOfGoods, NumberUtil.sub(yxStoreOrder.getTotalPrice(), yxStoreOrder.getPayPostage())), yxStoreOrder.getCouponPrice());
|
||||
// BigDecimal commodityDiscountAmount = NumberUtil.mul(NumberUtil.div(totalAmountOfGoods, NumberUtil.sub(yxStoreOrder.getTotalPrice(), yxStoreOrder.getPayPostage())), yxStoreOrder.getCouponPrice());
|
||||
BigDecimal totalPriceMinusPostage = NumberUtil.sub(yxStoreOrder.getTotalPrice(), yxStoreOrder.getPayPostage());
|
||||
BigDecimal commodityDiscountAmount;
|
||||
|
||||
if (totalPriceMinusPostage.compareTo(BigDecimal.ZERO) != 0) {
|
||||
commodityDiscountAmount = NumberUtil.mul(NumberUtil.div(totalAmountOfGoods, totalPriceMinusPostage), yxStoreOrder.getCouponPrice());
|
||||
} else {
|
||||
// 处理除数为零的情况,返回默认值
|
||||
commodityDiscountAmount = BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
//商品优惠后总金额
|
||||
totalPrice = NumberUtil.add(totalPrice, NumberUtil.sub(totalAmountOfGoods, commodityDiscountAmount));
|
||||
// todo 根据自己的业务逻辑修改,是否退运费,默认退运费
|
||||
|
Reference in New Issue
Block a user