Authored by chenchao

calculate tariff amount by using initial price

@@ -153,8 +153,9 @@ public class ChargeService { @@ -153,8 +153,9 @@ public class ChargeService {
153 double newFinalAmount = Math.max(0, YHMath.sub(oldFinalAmount, realCutPrice.doubleValue())); 153 double newFinalAmount = Math.max(0, YHMath.sub(oldFinalAmount, realCutPrice.doubleValue()));
154 154
155 //税费 155 //税费
  156 + BigDecimal goodsPrice = chargeGoods.getGoodsPrice();
156 AmountCutPolicy tariffCutPolicy = chargeContext.getChargeParam().getTariffCutPolicy(); 157 AmountCutPolicy tariffCutPolicy = chargeContext.getChargeParam().getTariffCutPolicy();
157 - SingleFeeDetail tariffFeeDetail = calculateTariffAmount(goodsRealPrice, tariffRate, tariffCutPolicy); 158 + SingleFeeDetail tariffFeeDetail = calculateTariffAmount(goodsPrice, tariffRate, tariffCutPolicy);
158 chargeResult.setTariffFee(tariffFeeDetail); 159 chargeResult.setTariffFee(tariffFeeDetail);
159 //加上税费 160 //加上税费
160 double tariffAmount = tariffFeeDetail.getAmount(); 161 double tariffAmount = tariffFeeDetail.getAmount();
@@ -16,7 +16,7 @@ import java.util.ArrayList; @@ -16,7 +16,7 @@ import java.util.ArrayList;
16 import java.util.List; 16 import java.util.List;
17 17
18 /** 18 /**
19 - * 购物 19 + * 购物
20 */ 20 */
21 @Component 21 @Component
22 public class ShoppingRiskWatchDog { 22 public class ShoppingRiskWatchDog {