fix: 排除超级管理员角色和用户数据

This commit is contained in:
TsMask
2024-04-08 15:05:05 +08:00
parent 1d442b2567
commit 996b764d13
2 changed files with 2 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ func (r *SysRoleImpl) SelectRolePage(query map[string]any, dataScopeSQL string)
}
// 构建查询条件语句
whereSql := " where r.del_flag = '0' "
whereSql := " where r.del_flag = '0' and r.role_id != '1' "
if len(conditions) > 0 {
whereSql += " and " + strings.Join(conditions, " and ")
}

View File

@@ -175,7 +175,7 @@ func (r *SysUserImpl) SelectUserPage(query map[string]any, dataScopeSQL string)
}
// 构建查询条件语句
whereSql := " where u.del_flag = '0' "
whereSql := " where u.del_flag = '0' and u.user_id != '1' "
if len(conditions) > 0 {
whereSql += " and " + strings.Join(conditions, " and ")
}