diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/AdminUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/AdminUserController.java index 7a8febc99..805da29f7 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/AdminUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/AdminUserController.java @@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.module.member.controller.admin.user.dto.AdminUserQueryDTO; import cn.iocoder.yudao.module.member.controller.admin.user.vo.AdminUserInfoRespVO; import cn.iocoder.yudao.module.member.controller.admin.user.vo.MemberUpdateStatusReqVO; @@ -101,6 +102,9 @@ public class AdminUserController { @PreAuthorize("@ss.hasPermission('member:user:query')") @TenantIgnore public CommonResult> findPageList(@RequestBody AdminUserQueryDTO queryDTO) { + if(!TenantContextHolder.ID_SYSTEM.equals(TenantContextHolder.getRequiredTenantId())){ + queryDTO.setTenantId(TenantContextHolder.getRequiredTenantId()); + } // 获得用户分页列表 PageResult pageResult = userService.findPageList(queryDTO); if (CollUtil.isEmpty(pageResult.getList())) { diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/dto/AdminUserQueryDTO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/dto/AdminUserQueryDTO.java index 4c2eb0e70..6b365ff0c 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/dto/AdminUserQueryDTO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/dto/AdminUserQueryDTO.java @@ -12,6 +12,10 @@ public class AdminUserQueryDTO extends PageParam { private String mobile; @Schema(description = "用户昵称", example = "芋艿") private String nickname; + + + @Schema(description = "租户id") + private Long tenantId; /** * 帐号状态 *

diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/user/MemberUserMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/user/MemberUserMapper.java index 5c751d92d..13f88ff4a 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/user/MemberUserMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/user/MemberUserMapper.java @@ -30,6 +30,7 @@ public interface MemberUserMapper extends BaseMapperX { .likeIfPresent(MemberUserDO::getMobile, reqVO.getMobile()) .likeIfPresent(MemberUserDO::getNickname,reqVO.getNickname()) .eqIfPresent(MemberUserDO::getStatus,reqVO.getStatus()) + .eqIfPresent(MemberUserDO::getTenantId,reqVO.getTenantId()) .orderByDesc(MemberUserDO::getId)); } }