Commit 2422ebb8 by xiaoer.li@freemud.com

Merge remote-tracking branch 'remotes/origin/feature/1.9.25__门店超出配送范围问题'

parents 63b0acc4 39a37184
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<version>2.6.1-SNAPSHOT</version> <version>2.8.1-SNAPSHOT</version>
<artifactId>storecenter-sdk</artifactId> <artifactId>storecenter-sdk</artifactId>
</dependency> </dependency>
......
...@@ -120,5 +120,8 @@ public class ShoppingCartGoodsResponseVo extends ShoppingCartGoodsBaseResponseV ...@@ -120,5 +120,8 @@ public class ShoppingCartGoodsResponseVo extends ShoppingCartGoodsBaseResponseV
*/ */
private String discountDeliveryActivityCode; private String discountDeliveryActivityCode;
/**
* 配送费为零的原因:0:正常,1:超出配送范围
*/
private Integer deliveryFeeZeroReason;
} }
...@@ -264,7 +264,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -264,7 +264,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
spuId, allCartGoodsList, productBeanListSpuClass); spuId, allCartGoodsList, productBeanListSpuClass);
} }
Long deliveryAmount = calculateDeliveryAmount(receiveId,partnerId,storeId,userLoginInfoDto.getWxAppid()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo);
// 获取优惠信息 // 获取优惠信息
ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult
...@@ -357,7 +357,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -357,7 +357,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, updateShoppingCartGoodsQtyRequestVo.getSessionId(), "", shoppingCartBaseService); assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, updateShoppingCartGoodsQtyRequestVo.getSessionId(), "", shoppingCartBaseService);
Long deliveryAmount = calculateDeliveryAmount(receiveId,partnerId,storeId,userLoginInfoDto.getWxAppid()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo);
// 获取优惠信息 // 获取优惠信息
ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult
=getCalculationDiscountResult(menuType,partnerId,storeId,userId,appId,userLoginInfoDto.getWxAppid(),orderType,assortmentCustomerInfoVo.isMemberPaid(),cartGoodsList,new ArrayList(),new ArrayList<>(),null,deliveryAmount); =getCalculationDiscountResult(menuType,partnerId,storeId,userId,appId,userLoginInfoDto.getWxAppid(),orderType,assortmentCustomerInfoVo.isMemberPaid(),cartGoodsList,new ArrayList(),new ArrayList<>(),null,deliveryAmount);
...@@ -458,7 +458,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -458,7 +458,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
coupon.setActivityCode(activityCode); coupon.setActivityCode(activityCode);
coupons.add(coupon); coupons.add(coupon);
} }
Long deliveryAmount = calculateDeliveryAmount(receiveId,partnerId,storeId,userLoginInfoDto.getWxAppid()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo);
// 获取优惠信息 // 获取优惠信息
ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult = getCalculationDiscountResult(menuType,partnerId,storeId,userId,appId,userLoginInfoDto.getWxAppid(),orderType,assortmentCustomerInfoVo.isMemberPaid(),cartGoodsList,coupons,null,shoppingCartInfoRequestVo.getReceiveId(),deliveryAmount); ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult = getCalculationDiscountResult(menuType,partnerId,storeId,userId,appId,userLoginInfoDto.getWxAppid(),orderType,assortmentCustomerInfoVo.isMemberPaid(),cartGoodsList,coupons,null,shoppingCartInfoRequestVo.getReceiveId(),deliveryAmount);
...@@ -624,7 +624,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -624,7 +624,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
} }
} }
Long deliveryAmount = calculateDeliveryAmount(receiveId,partnerId,storeId,userLoginInfoDto.getWxAppid()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo);
// 获取优惠信息 // 获取优惠信息
ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult = getCalculationDiscountResult(menuType,partnerId,storeId,userId,appId,userLoginInfoDto.getWxAppid(),orderType,assortmentCustomerInfoVo.isMemberPaid(),cartGoodsList,coupons,sendGoodsList,shoppingCartInfoRequestVo.getReceiveId(),deliveryAmount); ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult = getCalculationDiscountResult(menuType,partnerId,storeId,userId,appId,userLoginInfoDto.getWxAppid(),orderType,assortmentCustomerInfoVo.isMemberPaid(),cartGoodsList,coupons,sendGoodsList,shoppingCartInfoRequestVo.getReceiveId(),deliveryAmount);
...@@ -1408,7 +1408,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1408,7 +1408,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return amount; return amount;
} }
private Long getNewDeliveryAmount(String receiveId, String partnerId, String storeId) { private Long getNewDeliveryAmount(String receiveId, String partnerId, String storeId, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo) {
String trackingNo = LogThreadLocal.getTrackingNo(); String trackingNo = LogThreadLocal.getTrackingNo();
Long amount = 0L; Long amount = 0L;
if (StringUtils.isBlank(receiveId)) { if (StringUtils.isBlank(receiveId)) {
...@@ -1433,6 +1433,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1433,6 +1433,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if(queryDeliverDetailResponse.getData().getDeliveryAmount() == null) { if(queryDeliverDetailResponse.getData().getDeliveryAmount() == null) {
throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR); throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR);
} }
shoppingCartGoodsResponseVo.setDeliveryFeeZeroReason(queryDeliverDetailResponse.getData().getDeliveryFeeZeroReason() != null ? queryDeliverDetailResponse.getData().getDeliveryFeeZeroReason() : 0);
return queryDeliverDetailResponse.getData().getDeliveryAmount(); return queryDeliverDetailResponse.getData().getDeliveryAmount();
} }
...@@ -1480,16 +1481,17 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1480,16 +1481,17 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return calculationDiscountResult; return calculationDiscountResult;
} }
private Long calculateDeliveryAmount(String receiveId,String partnerId,String storeId,String wxappid){ private Long calculateDeliveryAmount(String receiveId, String partnerId, String storeId, String wxappid, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo) {
Long deliveryAmount = 0L; Long deliveryAmount = 0L;
if(StringUtils.isBlank(receiveId)) { if (StringUtils.isBlank(receiveId)) {
return deliveryAmount; return deliveryAmount;
} }
log.info("获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}", LogThreadLocal.getTrackingNo(), storeDeliveryUseOld, receiveId, partnerId, storeId); log.info("获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}", LogThreadLocal.getTrackingNo(), storeDeliveryUseOld, receiveId, partnerId, storeId);
if(storeDeliveryUseOld) { if (storeDeliveryUseOld) {
deliveryAmount = Long.parseLong(getDeliveryAmount(receiveId,partnerId,storeId).toString()); deliveryAmount = Long.parseLong(getDeliveryAmount(receiveId, partnerId, storeId).toString());
shoppingCartGoodsResponseVo.setDeliveryFeeZeroReason(0);
} else { } else {
deliveryAmount = getNewDeliveryAmount(receiveId, partnerId, storeId); deliveryAmount = getNewDeliveryAmount(receiveId, partnerId, storeId, shoppingCartGoodsResponseVo);
} }
return deliveryAmount; return deliveryAmount;
......
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