Commit bec27722 by 徐康

Merge branch 'feature/xukang_20200601_麦咖啡P7V1' into qa

# Conflicts:
#	shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
parents fb97dd77 7e465ef8
...@@ -281,6 +281,23 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -281,6 +281,23 @@ public class ShoppingCartMCoffeeServiceImpl {
newCartGoods.add(cartGoods9998); newCartGoods.add(cartGoods9998);
} }
} }
if(null != shoppingCartGoodsResponseVo.getActivityTip() && CollectionUtils.isNotEmpty(shoppingCartGoodsResponseVo.getActivityTip().getActivityList())) {
Optional<ActivityList> activityListOptional = shoppingCartGoodsResponseVo.getActivityTip().getActivityList().stream().filter(
o -> ActivityTypeEnum.TYPE_230.getCode().equals(o.getTipType())).findFirst();
if(activityListOptional.isPresent()) {
List<CartGoods> cartSendGoodsList = assortmentSdkService.getShoppingCartSendGoods(partnerId, storeId, userId, sessionId, "", shoppingCartBaseService);
if(CollectionUtils.isEmpty(cartSendGoodsList)
|| activityListOptional.get().getMcCafeSendGoodsList().stream().noneMatch(o-> o.getSkuId().equals(cartSendGoodsList.get(0).getSkuId()))) {
MCoffeeAddGoodsRequestVo selectGoodsRequest = new MCoffeeAddGoodsRequestVo();
BeanUtils.copyProperties(addShoppingCartGoodsRequestVo, selectGoodsRequest);
selectGoodsRequest.setSkuId(activityListOptional.get().getMcCafeSendGoodsList().get(0).getSkuId());
selectGoodsRequest.setSpuId(activityListOptional.get().getMcCafeSendGoodsList().get(0).getSkuId());
selectSendGoods(selectGoodsRequest);
}
}
}
// 重新保存购物车数据 // 重新保存购物车数据
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, newCartGoods, null, tableNumber, this.shoppingCartBaseService); assortmentSdkService.setShoppingCart(partnerId, storeId, userId, newCartGoods, null, tableNumber, this.shoppingCartBaseService);
} }
......
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