fix(system): 修正超级管理员标识及关联查询逻辑

- 将 TenantMapper.xml 中用户表连接更新为使用 gxwebsoft_core.sys_user
- 修改关联查询条件,使用 is_super_admin 替代 is_admin 标识
- 调整 User 实体中 isSuperAdmin 字段,移除@TableField注解以确保正确映射
This commit is contained in:
2026-04-27 09:07:16 +08:00
parent 64e9674d0e
commit ed9d500e5d
2 changed files with 1 additions and 2 deletions

View File

@@ -197,7 +197,6 @@ public class User implements UserDetails {
private Integer isOrganizationAdmin; private Integer isOrganizationAdmin;
@Schema(description = "是否超级管理员") @Schema(description = "是否超级管理员")
@TableField(exist = false)
private Boolean isSuperAdmin; private Boolean isSuperAdmin;
@Schema(description = "租户管理员ID") @Schema(description = "租户管理员ID")

View File

@@ -8,7 +8,7 @@
u.phone,u.username u.phone,u.username
FROM sys_tenant a FROM sys_tenant a
LEFT JOIN sys_company b ON a.tenant_id = b.tenant_id LEFT JOIN sys_company b ON a.tenant_id = b.tenant_id
LEFT JOIN sys_user u ON u.tenant_id = a.tenant_id AND u.is_admin = 1 AND u.deleted = 0 LEFT JOIN gxwebsoft_core.sys_user u ON u.tenant_id = a.tenant_id AND u.is_super_admin = 1 AND u.deleted = 0
<where> <where>
<if test="param.tenantId != null"> <if test="param.tenantId != null">
AND a.tenant_id = #{param.tenantId} AND a.tenant_id = #{param.tenantId}