提交代码

master
胡锐 5 months ago
parent c520f8e2e3
commit c5d8b4ccc3
  1. 4
      service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java
  2. 2
      service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java

@ -125,7 +125,7 @@ public class BsGasServiceImpl implements BsGasService {
payPriceModel.setPricePlatform(pricePlatform);
// 加油升数,计算方式:加油金额 / 国标价
payPriceModel.setOilLiters(refuelPrice.divide(priceOfficial, 2, BigDecimal.ROUND_HALF_DOWN));
payPriceModel.setOilLiters(refuelPrice.divide(priceGun, 2, BigDecimal.ROUND_HALF_DOWN));
// 平台折扣,我们平台或者代理商设置的折扣
payPriceModel.setDiscount(discount.compareTo(new BigDecimal("1.00")) == 0 ? new BigDecimal("1.00") : discount);
@ -134,7 +134,7 @@ public class BsGasServiceImpl implements BsGasService {
payPriceModel.setPricePreferences(priceVip.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP));
// 每升优惠 国标价 - 优惠价格
payPriceModel.setLitersPreferences(payPriceModel.getPriceOfficial().subtract(payPriceModel.getPricePreferences()));
payPriceModel.setLitersPreferences(payPriceModel.getPriceGun().subtract(payPriceModel.getPricePreferences()));
// 本次优惠 加油升数 * 每升优惠
payPriceModel.setTotalPreferences(payPriceModel.getOilLiters().multiply(payPriceModel.getLitersPreferences()).setScale(2, BigDecimal.ROUND_HALF_UP));

@ -64,8 +64,6 @@ public class OrderPaySuccessService {
// 查询加油订单
BsGasOrder gasOrder = gasOrderService.getDetailByOrderNo(order.getOrderNo());
if (gasOrder != null) {
gasOrder.setTotalDeductionPrice(order.getDeduction().getTotalDeductionPrice());
gasOrder.setDeductionCouponPrice(order.getDeduction().getCouponDiscountPrice());
gasOrder.setPayIntegral(order.getDeduction().getIntegralDiscountPrice());
gasOrder.setActualPayPrice(order.getPayRealPrice());
gasOrder.setPayType(order.getPayType());

Loading…
Cancel
Save