Commit ad39b11e by shuhu.hou@freemud.cn

买赠商品添加weight、unit字段fixbug

parent 242db394
...@@ -85,7 +85,7 @@ public class BuySendPromotionService implements IPromotionService { ...@@ -85,7 +85,7 @@ public class BuySendPromotionService implements IPromotionService {
} }
} }
//更新商品详情信息 //更新商品详情信息
updateSendGooodsInfo(newCartGoodsList,shoppingCartInfoRequestVo); updateSendGooodsInfo(newCartGoodsList,activityQueryDto,shoppingCartInfoRequestVo);
//价格从低到高筛选出maxNum个,并将价格设置为0 //价格从低到高筛选出maxNum个,并将价格设置为0
newCartGoodsList.sort(Comparator.comparing(CartGoods::getOriginalPrice)); newCartGoodsList.sort(Comparator.comparing(CartGoods::getOriginalPrice));
// 优惠商品总包装费 // 优惠商品总包装费
...@@ -232,10 +232,10 @@ public class BuySendPromotionService implements IPromotionService { ...@@ -232,10 +232,10 @@ public class BuySendPromotionService implements IPromotionService {
* 例如:weight、unit字段 * 例如:weight、unit字段
* @param newCartGoodsList * @param newCartGoodsList
*/ */
private void updateSendGooodsInfo(List<CartGoods> newCartGoodsList,ShoppingCartInfoRequestVo shoppingCartInfoRequestVo){ private void updateSendGooodsInfo(List<CartGoods> newCartGoodsList,ActivityQueryDto activityQueryDto,ShoppingCartInfoRequestVo shoppingCartInfoRequestVo){
List<String> goodsIds = newCartGoodsList.stream().map(CartGoods::getGoodsId).collect(Collectors.toList()); List<String> goodsIds = newCartGoodsList.stream().map(CartGoods::getGoodsId).collect(Collectors.toList());
List<ProductBeanDTO> productBeanList = assortmentSdkService.getProductsInfoSdk(shoppingCartInfoRequestVo.getPartnerId() List<ProductBeanDTO> productBeanList = assortmentSdkService.getProductsInfoSdk(activityQueryDto.getPartnerId()
, shoppingCartInfoRequestVo.getShopId(), goodsIds, shoppingCartInfoRequestVo.getMenuType() ,shoppingCartBaseService); , activityQueryDto.getStoreId(), goodsIds, shoppingCartInfoRequestVo==null?null:shoppingCartInfoRequestVo.getMenuType() ,shoppingCartBaseService);
if (CollectionUtils.isEmpty(productBeanList)) { if (CollectionUtils.isEmpty(productBeanList)) {
throw new ServiceException(ResponseResult.SHOPPING_CART_GIFTS_PRODUCT_NOT_EXIST); throw new ServiceException(ResponseResult.SHOPPING_CART_GIFTS_PRODUCT_NOT_EXIST);
} }
......
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