feat:部门管理权限

This commit is contained in:
dzc committed 2025-09-29 09:10:34 +08:00
1 parent 86f02bf68c
commit 7d4bf4a7a7
2 files changed
+2 -2

No files matched your search

@@ -65,7 +65,7 @@ public class DataScopeInnerInterceptor implements DataScopeInterceptor {
dataScope.getFunc().getType(), originalSql, dataScope.getScopeUserName(), dataScope.getUsername(), dataScope.getScopeDeptName(), join);
}
// 3. 如果为本人
else if (StrUtil.isNotBlank(dataScope.getUsername())) {
else if (StrUtil.isNotBlank(dataScope.getUsername()) && ObjectUtil.isNotEmpty(dataScope.getScopeUserName())) {
originalSql = String.format("SELECT %s FROM (%s) temp_data_scope WHERE temp_data_scope.%s = '%s'",
dataScope.getFunc().getType(), originalSql, dataScope.getScopeUserName(), dataScope.getUsername());
}
@@ -258,7 +258,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Override
public IPage<UserVO> getUsersWithRolePage(Page page, UserDTO userDTO) {
DataScope dataScope = DataScope.of();
// dataScope.setScopeUserName(null);
dataScope.setScopeUserName(null);
IPage<UserVO> list = baseMapper.getUserVosPage(page, userDTO, dataScope);
if (ObjectUtil.isNotEmpty(list.getRecords())) {
List<Long> userIds = list.getRecords().stream().map(UserVO::getUserId).distinct().toList();