|
@@ -164,7 +164,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Map<String,Object> getCategoryAndGoods(GoodsQueryParam param){
|
|
|
|
|
|
+ public List<GoodsDTO> getMerchantGoodsList(GoodsQueryParam param){
|
|
Map<String,Object> goodsMap = new HashMap<>();
|
|
Map<String,Object> goodsMap = new HashMap<>();
|
|
List<Goods> goods = this.lambdaQuery()
|
|
List<Goods> goods = this.lambdaQuery()
|
|
.like(StringUtils.notEmpty(param.getGoodsName()),Goods::getName,param.getGoodsName())
|
|
.like(StringUtils.notEmpty(param.getGoodsName()),Goods::getName,param.getGoodsName())
|
|
@@ -177,15 +177,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
if (goodsList == null && goodsList.size() < 1 ){
|
|
if (goodsList == null && goodsList.size() < 1 ){
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- goodsMap.put("goodsList",goodsList);
|
|
|
|
- List<Long> idSet = goodsList.stream()
|
|
|
|
- .map(GoodsDTO::getCategoryId) // 将每个Person对象映射到其id
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
- if (!idSet.isEmpty()) {
|
|
|
|
- List<CategoryDTO> categories = this.categoryService.listCategories(idSet);
|
|
|
|
- goodsMap.put("categories",categories);
|
|
|
|
- }
|
|
|
|
- return goodsMap;
|
|
|
|
|
|
+ return goodsList;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|