diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/base/service/impl/ShopBaseProductCategoryServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/base/service/impl/ShopBaseProductCategoryServiceImpl.java index fefd23e3..8342d4b6 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/base/service/impl/ShopBaseProductCategoryServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/base/service/impl/ShopBaseProductCategoryServiceImpl.java @@ -485,13 +485,21 @@ public class ShopBaseProductCategoryServiceImpl extends BaseServiceImpl voucher_item_ids = productSearchDTO.getVoucher_item_id(); if (CollUtil.isNotEmpty(voucher_item_ids)) { List itemList = shopProductItemService.find(new QueryWrapper().in("item_id", voucher_item_ids)); - if (CollUtil.isNotEmpty(itemList)) { product_id_row = CommonUtil.column(itemList, ShopProductItem::getProduct_id); productSearchDTO.setProduct_ids(product_id_row); } } // end + //根据itemid查询 + List itemIdList = productSearchDTO.getItem_ids(); + if (CollUtil.isNotEmpty(itemIdList)) { + List itemList = shopProductItemService.find(new QueryWrapper().in("item_id", itemIdList)); + if (CollUtil.isNotEmpty(itemList)) { + product_id_row = CommonUtil.column(itemList, ShopProductItem::getProduct_id); + productSearchDTO.setProduct_ids(product_id_row); + } + } String show_type = accountBaseConfigService.getProductShowType(); productSearchDTO.setShow_type(show_type);