角色列表只获取当前用户列表

This commit is contained in:
张松 2025-04-11 14:56:38 +08:00
parent aee5de6a33
commit 82fd069dca
1 changed files with 2 additions and 2 deletions

View File

@ -48,9 +48,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> imp
@Override
public Page<SysRole> getList(Long shopId, PageDTO pageDTO, String key, String startTime, String endTime) {
QueryWrapper queryWrapper = new QueryWrapper();
if (!StpKit.USER.isAdmin()) {
// if (!StpKit.USER.isAdmin()) {
queryWrapper.eq(SysRole::getCreateUserId, StpKit.USER.getLoginIdAsLong());
}
// }
if (StrUtil.isNotBlank(key)) {
queryWrapper.and(column(SysRole::getName).like(key).or(column(SysRole::getDescription).like(key)));