Commit c86215f2 by 姜海波

调整配送费 小数点

parent 2ca0bb30
...@@ -1021,11 +1021,11 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1021,11 +1021,11 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if(discount!=null){ if(discount!=null){
if(calculationDiscountResult.getDistributionFee()>0){ if(calculationDiscountResult.getDistributionFee()>0){
String desc = DELIVERY_DISCOUNT_DESC1; String desc = DELIVERY_DISCOUNT_DESC1;
shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, Double.parseDouble(discount.getThresholdAmount().toString()) / 100 shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, discount.getThresholdAmount().doubleValue() / 100
, Double.parseDouble(String.valueOf(calculationDiscountResult.getDeliveryAmount() - calculationDiscountResult.getDistributionFee())) / 100)); , (calculationDiscountResult.getDeliveryAmount().doubleValue() - calculationDiscountResult.getDistributionFee().doubleValue()) / 100));
}else{ }else{
String desc = DELIVERY_DISCOUNT_DESC2; String desc = DELIVERY_DISCOUNT_DESC2;
shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, Double.parseDouble(discount.getThresholdAmount().toString()) / 100)); shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, discount.getThresholdAmount().doubleValue() / 100));
} }
shoppingCartGoodsResponseVo.setDeliveryAmount(calculationDiscountResult.getDeliveryAmount()); shoppingCartGoodsResponseVo.setDeliveryAmount(calculationDiscountResult.getDeliveryAmount());
shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(calculationDiscountResult.getDistributionFee()); shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(calculationDiscountResult.getDistributionFee());
...@@ -1043,10 +1043,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1043,10 +1043,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if(beanDto.getBenefitType() == 1||beanDto.getDiscountAmount()>=deliveryAmount){ if(beanDto.getBenefitType() == 1||beanDto.getDiscountAmount()>=deliveryAmount){
String desc = DELIVERY_DISCOUNT_DESC2; String desc = DELIVERY_DISCOUNT_DESC2;
shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, Double.parseDouble(beanDto.getThresholdAmount().toString()) /100 )); shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, beanDto.getThresholdAmount().doubleValue() /100 ));
}else{ }else{
String desc = DELIVERY_DISCOUNT_DESC1; String desc = DELIVERY_DISCOUNT_DESC1;
shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, Double.parseDouble(beanDto.getThresholdAmount().toString()) /100 ,beanDto.getDiscountAmount() / 100)); shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, beanDto.getThresholdAmount().doubleValue() /100 ,beanDto.getDiscountAmount() / 100));
} }
shoppingCartGoodsResponseVo.setDeliveryAmount(deliveryAmount); shoppingCartGoodsResponseVo.setDeliveryAmount(deliveryAmount);
...@@ -1055,7 +1055,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1055,7 +1055,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}else{ }else{
String desc = DELIVERY_DISCOUNT_DESC3; String desc = DELIVERY_DISCOUNT_DESC3;
shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, Double.parseDouble(deliveryAmount.toString()) / 100)); shoppingCartGoodsResponseVo.setDeliveryDiscountDesc(String.format(desc, deliveryAmount.doubleValue() / 100));
shoppingCartGoodsResponseVo.setDeliveryAmount(deliveryAmount); shoppingCartGoodsResponseVo.setDeliveryAmount(deliveryAmount);
shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(deliveryAmount); shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(deliveryAmount);
shoppingCartGoodsResponseVo.setIsDiscountDelivery(false); shoppingCartGoodsResponseVo.setIsDiscountDelivery(false);
......
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