修复店铺结算单结算金额对于积分商品和砍价商品重复计算问题

This commit is contained in:
paulGao
2022-01-10 18:04:21 +08:00
parent ad1f086e4d
commit d2cab9f4a1
3 changed files with 70 additions and 11 deletions

View File

@@ -90,7 +90,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
.eq("store_id", storeId)
.eq("flow_type", FlowTypeEnum.PAY.name())
.between("create_time", startTime, endTime));
Double orderPrice = 0D;
double orderPrice = 0D;
if (orderBill != null) {
bill.setOrderPrice(orderBill.getOrderPrice());
bill.setCommissionPrice(orderBill.getCommissionPrice());
@@ -99,8 +99,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
bill.setPointSettlementPrice(orderBill.getPointSettlementPrice());
bill.setKanjiaSettlementPrice(orderBill.getKanjiaSettlementPrice());
//入账金额=订单金额+积分商品+砍价商品
orderPrice = CurrencyUtil.add(CurrencyUtil.add(orderBill.getBillPrice(), orderBill.getPointSettlementPrice()),
orderBill.getKanjiaSettlementPrice());
orderPrice = orderBill.getBillPrice();
}