Commit e24b2958 by zhiheng.zhang

配送费计算逻辑问题查找

parent a96504f4
...@@ -179,12 +179,15 @@ public class OrderAdapter { ...@@ -179,12 +179,15 @@ public class OrderAdapter {
ArrayList<CreateOrderAccountRequest> orderAccountDtos = new ArrayList<>(); ArrayList<CreateOrderAccountRequest> orderAccountDtos = new ArrayList<>();
long deliveryAmount = 0; long deliveryAmount = 0;
long discountDeliveryAmount = 0; long discountDeliveryAmount = 0;
if (createOrderVo.getMenuType().equals(BusinessTypeEnum.SAAS_DELIVERY.getCode()) || createOrderVo.getMenuType().equals(BusinessTypeEnum.SAAS_MALL.getCode())) { if (createOrderVo.getMenuType().equals(BusinessTypeEnum.SAAS_DELIVERY.getCode())) {
deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount() == null ? 9l : shoppingCartGoodsDto.getDeliveryAmount(); deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount() == null ? 9l : shoppingCartGoodsDto.getDeliveryAmount();
discountDeliveryAmount = shoppingCartGoodsDto.getDeliveryAmount() == null ? 9l : shoppingCartGoodsDto.getDeliveryAmount(); discountDeliveryAmount = shoppingCartGoodsDto.getDeliveryAmount() == null ? 9l : shoppingCartGoodsDto.getDeliveryAmount();
if (shoppingCartGoodsDto.getIsDiscountDelivery() && deliveryAmount > shoppingCartGoodsDto.getDiscountDeliveryAmount()) { if (shoppingCartGoodsDto.getIsDiscountDelivery() && deliveryAmount > shoppingCartGoodsDto.getDiscountDeliveryAmount()) {
discountDeliveryAmount = shoppingCartGoodsDto.getDiscountDeliveryAmount(); discountDeliveryAmount = shoppingCartGoodsDto.getDiscountDeliveryAmount();
} }
}else if( createOrderVo.getMenuType().equals(BusinessTypeEnum.SAAS_MALL.getCode())){
deliveryAmount = shoppingCartGoodsDto.getDeliveryAmount() == null ? 0 : shoppingCartGoodsDto.getDeliveryAmount();
discountDeliveryAmount = null == shoppingCartGoodsDto.getDiscountDeliveryAmount() ? 0 : shoppingCartGoodsDto.getDiscountDeliveryAmount();
} }
Long packageAmount = shoppingCartGoodsDto.getPackageAmount() == null ? 0L : shoppingCartGoodsDto.getPackageAmount(); Long packageAmount = shoppingCartGoodsDto.getPackageAmount() == null ? 0L : shoppingCartGoodsDto.getPackageAmount();
createOrderDto.setAmount(shoppingCartGoodsDto.getTotalAmount() + discountDeliveryAmount + packageAmount); createOrderDto.setAmount(shoppingCartGoodsDto.getTotalAmount() + discountDeliveryAmount + packageAmount);
......
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