Commit 74d48c3c by 胡敬轩

爱马哥预定单biztype=7

parent 004e9e4a
......@@ -25,4 +25,9 @@ public class ActivityQueryDto {
private ActivityQueryResponseDto activityQueryResponseDto;
/**
* 业务类型 7-预定单 爱马哥蛋糕预定场景使用(2.0.41迭代 1032929)
*/
private Integer bizType;
}
......@@ -126,7 +126,7 @@ public class CouponPromotionService implements IPromotionService {
List<String> uuidList = spqIdToCartUuid.get(sqpInfo.getCouponCode());
if (CollectionUtils.isNotEmpty(uuidList)){
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;
CheckSpqInfoResponseDto checkSpqInfoResponseDto = validCouponMap.get(spqId);
shoppingCartGoodsResponseVo.setChanged(true);
......
......@@ -190,7 +190,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = 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);
......@@ -298,8 +298,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
, partnerId
, null
, userId
, storeId
,null);
, storeId);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,discountResult,null,partnerId);
......@@ -456,7 +455,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
, partnerId
,shoppingCartInfoRequestVo.getFlag()
, userId
, storeId,null);
, storeId);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,calculationSharingDiscountResult,shoppingCartInfoRequestVo.getFlag(),partnerId);
......
......@@ -370,6 +370,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, addShoppingCartGoodsRequestVo.getOrderType());
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, addShoppingCartGoodsRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
if (grayPush(partnerId, storeId, "2")) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null;
discountResult = sharingDiscountService.getCalculationSharingDiscountResult(menuType
......@@ -398,8 +399,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, partnerId
, null
, userId
, storeId
, bizType);
, storeId);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo, discountResult, null, partnerId);
} else {
......@@ -502,6 +502,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, updateShoppingCartGoodsQtyRequestVo.getOrderType());
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, updateShoppingCartGoodsQtyRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
// 根据商户门店判断是否走新促销
if (grayPush(partnerId, storeId, "2")) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult discountResult = null;
......@@ -531,8 +532,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, partnerId
, null
, userId
, storeId
, bizType);
, storeId);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo, discountResult, null, partnerId);
} else {
......@@ -686,6 +686,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo.getOrderType());
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartInfoRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
CouponPromotionVO couponPromotionVO = couponAdapter.getCouponPromotionVO(shoppingCartInfoRequestVo, userLoginInfoDto);
// fisherman 作用: 调用可选优惠券 计算 配送券是否可用
couponPromotionVO.setDeliveryAmount(deliveryAmount);
......@@ -738,8 +739,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, partnerId
, shoppingCartInfoRequestVo.getFlag()
, userId
, storeId
,bizType);
, storeId);
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,calculationSharingDiscountResult,shoppingCartInfoRequestVo.getFlag(),partnerId);
} else {
List<ActivityCalculationDiscountRequestDto.CalculationDiscountCoupon> coupons = new ArrayList<>();
......@@ -966,6 +966,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo = new ShoppingCartGoodsResponseVo();
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartClearRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
ArrayList<ActivityList> activityList = new ArrayList<>();
PromotionMessageDto promotionMessageDto = fullSubtractionActivityService.getFullPromotionActivityInfo(activityQueryDto, null, activityList);
......@@ -1077,6 +1078,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
}
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartInfoRequestVo.getOrderType());
activityQueryDto.setBizType(bizType);
CouponPromotionVO couponPromotionVO = couponAdapter.getCouponPromotionVO(shoppingCartInfoRequestVo, userLoginInfoDto);
Long deliveryAmount = calculateDeliveryAmount(receiveId, partnerId, storeId, userLoginInfoDto.getWxAppid(), shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo.getOrderType());
......
......@@ -68,8 +68,7 @@ public class CalculationSharingCartService {
, String partnerId
, Integer flag
, String userId
, String storeId
, Integer bizType) {
, String storeId) {
/**
* 用促销价格初始化购物车行记录成交价
......@@ -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 {
if (GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
if (CollectionUtils.isEmpty(cartGoods.getProductGroupList()) && CollectionUtils.isEmpty(cartGoods.getProductComboList())) {
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);
}
}
......
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