|
@@ -87,12 +87,12 @@ public class ApiShopController extends BaseController {
|
|
@GetMapping("/page")
|
|
@GetMapping("/page")
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperation(value = "分页查询门店列表", notes = "传入shop")
|
|
@ApiOperation(value = "分页查询门店列表", notes = "传入shop")
|
|
- public R<IPage<ShopVO>> page(ShopVO shop, Query query) {
|
|
|
|
|
|
+ public R<IPage<ShopVO>> page(Query query) {
|
|
LambdaQueryWrapper<Shop> wrapper = Wrappers.lambdaQuery(Shop.class);
|
|
LambdaQueryWrapper<Shop> wrapper = Wrappers.lambdaQuery(Shop.class);
|
|
- wrapper.eq(Shop::getMerchantId, AuthUtil.getUserId());
|
|
|
|
- shop.setMerchantId(AuthUtil.getUserId());
|
|
|
|
if (!isMerchant()) {
|
|
if (!isMerchant()) {
|
|
- wrapper.in(BaseEntity::getId, iUserMerchantService.getByUserId(AuthUtil.getUserId()));
|
|
|
|
|
|
+ wrapper.in(BaseEntity::getId, iUserMerchantService.getAuthShopId(AuthUtil.getUserId()));
|
|
|
|
+ } else {
|
|
|
|
+ wrapper.eq(Shop::getMerchantId, AuthUtil.getUserId());
|
|
}
|
|
}
|
|
IPage<Shop> pages = iShopService.page(Condition.getPage(query), wrapper);
|
|
IPage<Shop> pages = iShopService.page(Condition.getPage(query), wrapper);
|
|
return R.data(ShopWrapper.build().pageVO(pages));
|
|
return R.data(ShopWrapper.build().pageVO(pages));
|