Commit 5e39a4e2 by 吕明尚

修改订单价格计算

parent 4343755c
......@@ -2608,7 +2608,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// priceResponse.setDiscount(totalFee.divide(payPrice, 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)));
// totalFee = getBigDecimal(consumerWallet, activity, timeLong, priceResponse, totalFee, byId, request);
// }
if (CollectionUtils.isNotEmpty(consumerSecondaryCardList)) {
totalFee = getBigDecimal(consumerSecondaryCardList, priceResponse, byId, payPrice);
}
}
priceResponse.setTotalFee(payPrice);
// if (ObjectUtil.isEmpty(consumerWallet) && totalFee.compareTo(new BigDecimal(0)) == 0 && CollectionUtils.isEmpty(consumerSecondaryCardList) && ObjectUtil.isNotEmpty(consumerMonthlyCard)) {
......@@ -2618,7 +2620,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// }
// 计算优惠券金额
if (ObjectUtil.isNull(request.getCouponId()) || request.getCouponId() <= 0) {
priceResponse.setPayFee(totalFee);
priceResponse.setCouponFee(BigDecimal.ZERO);
priceResponse.setDiscountFee(priceResponse.getTotalFee().subtract(priceResponse.getPayFee()));
// if (priceResponse.getTotalFee().compareTo(new BigDecimal(0)) == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment