商品列表问题
This commit is contained in:
@@ -30,7 +30,7 @@ public class GbWareServiceImpl extends ServiceImpl<GbWareMapper, GbWare> impleme
|
||||
|
||||
|
||||
@Override
|
||||
public Page<GbWare> getGbWarePage(GbWareQueryParamDTO param, Long shopId) {
|
||||
public Page<GbWare> getGbWarePage(GbWareQueryParamDTO param, Long shopId, boolean isAdmin) {
|
||||
if (!shopInfoService.checkSwitch(shopId, ShopSwitchTypeEnum.GROUP_BUY)) {
|
||||
return new Page<>();
|
||||
}
|
||||
@@ -53,9 +53,11 @@ public class GbWareServiceImpl extends ServiceImpl<GbWareMapper, GbWare> impleme
|
||||
});
|
||||
});
|
||||
Page<GbWare> page = page(Page.of(param.getPage(), param.getSize()), queryWrapper);
|
||||
page.getRecords().forEach(item -> {
|
||||
item.setShopId(shopId);
|
||||
});
|
||||
if (!isAdmin) {
|
||||
page.getRecords().forEach(item -> {
|
||||
item.setShopId(shopId);
|
||||
});
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user