|
@@ -169,6 +169,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<ProductCategoryDO> getEnableCategoryList(Long merchantId, Long shopId) {
|
|
public List<ProductCategoryDO> getEnableCategoryList(Long merchantId, Long shopId) {
|
|
|
|
+ // 分为商城和店铺
|
|
if(merchantId != null && shopId != null) {
|
|
if(merchantId != null && shopId != null) {
|
|
List<ProductSpuDO> spuDOS = productSpuService.getSpuListByMerchantIdAndShopId(merchantId, shopId);
|
|
List<ProductSpuDO> spuDOS = productSpuService.getSpuListByMerchantIdAndShopId(merchantId, shopId);
|
|
List<Long> categoryIds = spuDOS.stream().map(ProductSpuDO::getCategoryId).distinct().collect(Collectors.toList());
|
|
List<Long> categoryIds = spuDOS.stream().map(ProductSpuDO::getCategoryId).distinct().collect(Collectors.toList());
|