Commit aadff706 by 周晓航

Merge branch 'KA-2.0.41-爱马哥预订单开发-zxh' of…

Merge branch 'KA-2.0.41-爱马哥预订单开发-zxh' of gitlab.freemud.com:order-group-application/order-group into KA-2.0.41-爱马哥预订单开发-zxh
parents 39bc5e15 74d48c3c
...@@ -25,4 +25,9 @@ public class ActivityQueryDto { ...@@ -25,4 +25,9 @@ public class ActivityQueryDto {
private ActivityQueryResponseDto activityQueryResponseDto; private ActivityQueryResponseDto activityQueryResponseDto;
/**
* 业务类型 7-预定单 爱马哥蛋糕预定场景使用(2.0.41迭代 1032929)
*/
private Integer bizType;
} }
...@@ -126,7 +126,7 @@ public class CouponPromotionService implements IPromotionService { ...@@ -126,7 +126,7 @@ public class CouponPromotionService implements IPromotionService {
List<String> uuidList = spqIdToCartUuid.get(sqpInfo.getCouponCode()); List<String> uuidList = spqIdToCartUuid.get(sqpInfo.getCouponCode());
if (CollectionUtils.isNotEmpty(uuidList)){ if (CollectionUtils.isNotEmpty(uuidList)){
List<CartGoods> newCartList = cartGoodsList.stream().filter(p -> !uuidList.contains(p.getCartGoodsUid())).collect(Collectors.toList()); List<CartGoods> newCartList = cartGoodsList.stream().filter(p -> !uuidList.contains(p.getCartGoodsUid())).collect(Collectors.toList());
assortmentSdkService.setShoppingCart(activityQueryDto.getPartnerId(), activityQueryDto.getStoreId(), userLoginInfoDto.getMemberId(), newCartList, null, null, this.shoppingCartBaseService,null); assortmentSdkService.setShoppingCart(activityQueryDto.getPartnerId(), activityQueryDto.getStoreId(), userLoginInfoDto.getMemberId(), newCartList, null, null, this.shoppingCartBaseService,activityQueryDto.getBizType());
cartGoodsList = newCartList; cartGoodsList = newCartList;
CheckSpqInfoResponseDto checkSpqInfoResponseDto = validCouponMap.get(spqId); CheckSpqInfoResponseDto checkSpqInfoResponseDto = validCouponMap.get(spqId);
shoppingCartGoodsResponseVo.setChanged(true); shoppingCartGoodsResponseVo.setChanged(true);
......
...@@ -190,7 +190,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService { ...@@ -190,7 +190,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null; CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null;
discountResult = sharingDiscountService.getCalculationSharingDiscountResult(menuType, partnerId, storeId, userId, appId, orderType, assortmentCustomerInfoVo.isMemberPaid(), allCartGoodsList, new ArrayList<>(), null, deliveryAmount, null,null); discountResult = sharingDiscountService.getCalculationSharingDiscountResult(menuType, partnerId, storeId, userId, appId, orderType, assortmentCustomerInfoVo.isMemberPaid(), allCartGoodsList, new ArrayList<>(), null, deliveryAmount, null,null);
sharingCartService.distribute(discountResult, allCartGoodsList, shoppingCartGoodsResponseVo, null, null, null, activityQueryDto, menuType, deliveryAmount, ShoppingCartConstant.ADD_AND_UPDATE, partnerId, null, userId, storeId,null); sharingCartService.distribute(discountResult, allCartGoodsList, shoppingCartGoodsResponseVo, null, null, null, activityQueryDto, menuType, deliveryAmount, ShoppingCartConstant.ADD_AND_UPDATE, partnerId, null, userId, storeId);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,discountResult,null,partnerId); buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,discountResult,null,partnerId);
...@@ -298,8 +298,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService { ...@@ -298,8 +298,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
, partnerId , partnerId
, null , null
, userId , userId
, storeId , storeId);
,null);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,discountResult,null,partnerId); buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,discountResult,null,partnerId);
...@@ -456,7 +455,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService { ...@@ -456,7 +455,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
, partnerId , partnerId
,shoppingCartInfoRequestVo.getFlag() ,shoppingCartInfoRequestVo.getFlag()
, userId , userId
, storeId,null); , storeId);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,calculationSharingDiscountResult,shoppingCartInfoRequestVo.getFlag(),partnerId); buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,calculationSharingDiscountResult,shoppingCartInfoRequestVo.getFlag(),partnerId);
......
...@@ -370,6 +370,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -370,6 +370,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, addShoppingCartGoodsRequestVo.getOrderType()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, addShoppingCartGoodsRequestVo.getOrderType());
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, addShoppingCartGoodsRequestVo.getOrderType()); ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, addShoppingCartGoodsRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
if (grayPush(partnerId, storeId, "2")) { if (grayPush(partnerId, storeId, "2")) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null; CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null;
discountResult = sharingDiscountService.getCalculationSharingDiscountResult(menuType discountResult = sharingDiscountService.getCalculationSharingDiscountResult(menuType
...@@ -398,8 +399,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -398,8 +399,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, partnerId , partnerId
, null , null
, userId , userId
, storeId , storeId);
, bizType);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo, discountResult, null, partnerId); buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo, discountResult, null, partnerId);
} else { } else {
...@@ -502,6 +502,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -502,6 +502,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, updateShoppingCartGoodsQtyRequestVo.getOrderType()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, updateShoppingCartGoodsQtyRequestVo.getOrderType());
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, updateShoppingCartGoodsQtyRequestVo.getOrderType()); ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, updateShoppingCartGoodsQtyRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
// 根据商户门店判断是否走新促销 // 根据商户门店判断是否走新促销
if (grayPush(partnerId, storeId, "2")) { if (grayPush(partnerId, storeId, "2")) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null; CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null;
...@@ -531,8 +532,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -531,8 +532,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, partnerId , partnerId
, null , null
, userId , userId
, storeId , storeId);
, bizType);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo, discountResult, null, partnerId); buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo, discountResult, null, partnerId);
} else { } else {
...@@ -686,6 +686,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -686,6 +686,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo.getOrderType()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo.getOrderType());
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartInfoRequestVo.getOrderType()); ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartInfoRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
CouponPromotionVO couponPromotionVO = couponAdapter.getCouponPromotionVO(shoppingCartInfoRequestVo, userLoginInfoDto); CouponPromotionVO couponPromotionVO = couponAdapter.getCouponPromotionVO(shoppingCartInfoRequestVo, userLoginInfoDto);
// fisherman 作用: 调用可选优惠券 计算 配送券是否可用 // fisherman 作用: 调用可选优惠券 计算 配送券是否可用
couponPromotionVO.setDeliveryAmount(deliveryAmount); couponPromotionVO.setDeliveryAmount(deliveryAmount);
...@@ -738,8 +739,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -738,8 +739,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, partnerId , partnerId
, shoppingCartInfoRequestVo.getFlag() , shoppingCartInfoRequestVo.getFlag()
, userId , userId
, storeId , storeId);
,bizType);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,calculationSharingDiscountResult,shoppingCartInfoRequestVo.getFlag(),partnerId); buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,calculationSharingDiscountResult,shoppingCartInfoRequestVo.getFlag(),partnerId);
} else { } else {
List<ActivityCalculationDiscountRequestDto.CalculationDiscountCoupon> coupons = new ArrayList<>(); List<ActivityCalculationDiscountRequestDto.CalculationDiscountCoupon> coupons = new ArrayList<>();
...@@ -966,6 +966,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -966,6 +966,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo = new ShoppingCartGoodsResponseVo(); ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo = new ShoppingCartGoodsResponseVo();
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartClearRequestVo.getOrderType()); ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartClearRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
ArrayList<ActivityList> activityList = new ArrayList<>(); ArrayList<ActivityList> activityList = new ArrayList<>();
PromotionMessageDto promotionMessageDto = fullSubtractionActivityService.getFullPromotionActivityInfo(activityQueryDto, null, activityList); PromotionMessageDto promotionMessageDto = fullSubtractionActivityService.getFullPromotionActivityInfo(activityQueryDto, null, activityList);
...@@ -1077,6 +1078,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1077,6 +1078,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
} }
} }
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartInfoRequestVo.getOrderType()); ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartInfoRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
CouponPromotionVO couponPromotionVO = couponAdapter.getCouponPromotionVO(shoppingCartInfoRequestVo, userLoginInfoDto); CouponPromotionVO couponPromotionVO = couponAdapter.getCouponPromotionVO(shoppingCartInfoRequestVo, userLoginInfoDto);
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo.getOrderType()); Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo.getOrderType());
......
...@@ -68,8 +68,7 @@ public class CalculationSharingCartService { ...@@ -68,8 +68,7 @@ public class CalculationSharingCartService {
, String partnerId , String partnerId
, Integer flag , Integer flag
, String userId , String userId
, String storeId , String storeId) {
, Integer bizType) {
/** /**
* 用促销价格初始化购物车行记录成交价 * 用促销价格初始化购物车行记录成交价
...@@ -82,7 +81,7 @@ public class CalculationSharingCartService { ...@@ -82,7 +81,7 @@ public class CalculationSharingCartService {
/** /**
* 可用券及券折扣 * 可用券及券折扣
*/ */
promotionSharingService.updateShoppingCartGoodsDiscount(discountResult, cartGoodsList, shoppingCartGoodsResponseVo, couponPromotionVO,shoppingCartInfoRequestVo, userId, partnerId, storeId, activityQueryDto.getOrderType(),bizType); promotionSharingService.updateShoppingCartGoodsDiscount(discountResult, cartGoodsList, shoppingCartGoodsResponseVo, couponPromotionVO,shoppingCartInfoRequestVo, userId, partnerId, storeId, activityQueryDto.getOrderType(),activityQueryDto.getBizType());
/** /**
* 满减处理 * 满减处理
......
...@@ -149,7 +149,7 @@ public class CalculationSharingDiscountService { ...@@ -149,7 +149,7 @@ public class CalculationSharingDiscountService {
if (GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) { if (GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
if (CollectionUtils.isEmpty(cartGoods.getProductGroupList()) && CollectionUtils.isEmpty(cartGoods.getProductComboList())) { if (CollectionUtils.isEmpty(cartGoods.getProductGroupList()) && CollectionUtils.isEmpty(cartGoods.getProductComboList())) {
cartGoodsList.remove(i); cartGoodsList.remove(i);
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, null, null, this.shoppingCartBaseService,null); assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, null, null, this.shoppingCartBaseService,bizType);
throw new ServiceException(ResponseResult.SHOPPING_CART_NO_MEAL); throw new ServiceException(ResponseResult.SHOPPING_CART_NO_MEAL);
} }
} }
......
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