Commit 7a61fd24 by chongfu.liang

parent 7d5b4027
......@@ -406,7 +406,7 @@ public interface ShoppingCartBaseService {
List<String> activityCode;
Map<String, Boolean> couponOrderWayMap;
detailsMap = detailVOList.stream().collect(Collectors.toMap(p -> p.getCode(), (p) -> p));
detailsMap = detailVOList.stream().collect(Collectors.toMap(p -> p.getCode(), (p) -> p, (v1, v2) ->v1));
activityCode = detailVOList.stream().map(p -> p.getActiveCode()).collect(Collectors.toList());
couponOrderWayMap = getCouponOrderWay(partnerId, activityCode, orderWay, trackingNo);
//遍历商品券是否有当前点餐方式点餐
......
......@@ -1693,7 +1693,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, CartGoods cartGoods, String spuId2, String userId, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo, String spuId
, List<CartGoods> allCartGoodsList, List<ProductBeanDTO> productBeanListSpuClass, CouponProductDto couponProductDto) {
// 商品券商品list
List<CartGoods> tmpCartGoods = allCartGoodsList.parallelStream().filter(k -> k.getCartGoodsUid().startsWith(CommonsConstant.COUPON_PREFIX)).collect(Collectors.toList());
List<CartGoods> tmpCartGoods = allCartGoodsList.parallelStream().filter(k -> (k.getCartGoodsUid().startsWith(CommonsConstant.COUPON_PREFIX) && !k.getCartGoodsUid().equals(spuId))).collect(Collectors.toList());
// 当已有商品券时,不得添加(暂时的限制)
if (CollectionUtils.isNotEmpty(tmpCartGoods)) {
setToastMsgIfNotExist(shoppingCartGoodsResponseVo, ShoppingCartConstant.ONE_TRADE_CAN_ONLY_USE_ONE_GOODS_COUPON);
......
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