|
@@ -78,6 +78,9 @@ public class GoodsLogic {
|
|
@Autowired
|
|
@Autowired
|
|
GoodsTagRelaService goodsTagrelaService;
|
|
GoodsTagRelaService goodsTagrelaService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ GoodsCompanyService goodsCompanyService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 商品列表
|
|
* 商品列表
|
|
*
|
|
*
|
|
@@ -89,9 +92,15 @@ public class GoodsLogic {
|
|
public IPage<GoodsNewBean> page(HttpServletRequest request,String keyword,String categoryId, Integer sort,Integer pageNum, Integer pageSize) {
|
|
public IPage<GoodsNewBean> page(HttpServletRequest request,String keyword,String categoryId, Integer sort,Integer pageNum, Integer pageSize) {
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat(request);
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat(request);
|
|
|
|
|
|
|
|
+ List<GoodsCompany> list = goodsCompanyService.lambdaQuery()
|
|
|
|
+ .eq(GoodsCompany::getCompanyId, currentCompanyWechat.getUser().getCompanyId())
|
|
|
|
+ .select(GoodsCompany::getGoodsId).list();
|
|
|
|
+
|
|
|
|
+ List<String> goodsList = list.stream().map(GoodsCompany::getGoodsId).collect(Collectors.toList());
|
|
|
|
+
|
|
IPage<GoodsNewBean> page = goodsSpecDetailMapper.queryGoodsList(new Page(pageNum, pageSize),
|
|
IPage<GoodsNewBean> page = goodsSpecDetailMapper.queryGoodsList(new Page(pageNum, pageSize),
|
|
currentCompanyWechat.getUser().getUserId(), currentCompanyWechat.getUser().getType(),
|
|
currentCompanyWechat.getUser().getUserId(), currentCompanyWechat.getUser().getType(),
|
|
- keyword, categoryId,sort,null);
|
|
|
|
|
|
+ keyword, categoryId,sort,goodsList);
|
|
|
|
|
|
this.supplyGoodsNewBean(page,currentCompanyWechat);
|
|
this.supplyGoodsNewBean(page,currentCompanyWechat);
|
|
return page;
|
|
return page;
|