添加机构名称

This commit is contained in:
2023-11-14 21:34:36 +08:00
parent c41d087b1d
commit 77f49ad332
2 changed files with 6 additions and 0 deletions

View File

@@ -28,6 +28,8 @@ public class UserDto extends OrgCommonDto {
@Comment("系统管理员标识")
private Boolean sysAdmin;
private String organizationName;
private List<RoleDto> roles;
private List<RoleDto> otherRoles;

View File

@@ -9,6 +9,7 @@ import lombok.Data;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;
import java.util.ArrayList;
import java.util.List;
@@ -51,6 +52,9 @@ public class UserEntity extends OrgCommonEntity {
@Comment("系统管理员标识")
private Boolean sysAdmin;
@Formula("(select tu.name from t_organization tu where tu.id = organization_id)")
private String organizationName;
public List<RoleEntity> allRoles() {
List<RoleEntity> allRoles = new ArrayList<>(this.roles);