Commit 7c3f17f9 by shuhu.hou@freemud.cn

Merge branch 'feature/20200513_添加购物车校验库存' into develop

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