refactor(system): 优化租户超级管理员字段命名

- 将Tenant实体中的超级管理员用户ID字段名从superAdminUserId修改为ownerId
- 更新字段的Schema描述,将“超级管理员用户ID”改为“超级管理员UID”
- 修改TenantMapper.xml中关联查询SQL对应的字段别名为ownerId以保持一致
- 保持原有逻辑和功能不变,提升字段命名语义清晰度
This commit is contained in:
2026-07-22 00:56:59 +08:00
parent eb9bfd167e
commit dbe4f2962d

View File

@@ -63,9 +63,9 @@ public class UserRoleController extends BaseController {
@Operation(summary = "添加用户角色")
@PostMapping()
public ApiResult<?> save(@RequestBody UserRole userRole) {
// 记录当前登录用户id
// 记录当前登录用户id(请求体未指定 userId 时,回退到当前登录用户)
User loginUser = getLoginUser();
if (loginUser != null) {
if (userRole.getUserId() == null && loginUser != null) {
userRole.setUserId(loginUser.getUserId());
}
if (userRoleService.save(userRole)) {