Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-zhouyin
This commit is contained in:
commit
db0222843f
18
src/main/java/club/joylink/rtss/entity/org/OrgProject.java
Normal file
18
src/main/java/club/joylink/rtss/entity/org/OrgProject.java
Normal file
@ -0,0 +1,18 @@
|
||||
package club.joylink.rtss.entity.org;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class OrgProject {
|
||||
private Long id;
|
||||
|
||||
private Long orgId;
|
||||
|
||||
private String projectCode;
|
||||
|
||||
private Long creatorId;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
}
|
@ -140,7 +140,8 @@ public class AccountVO implements Serializable {
|
||||
private List<String> projectCodes;
|
||||
|
||||
|
||||
public AccountVO() {}
|
||||
public AccountVO() {
|
||||
}
|
||||
|
||||
public AccountVO(SysAccount account) {
|
||||
this.id = account.getId();
|
||||
@ -262,6 +263,7 @@ public class AccountVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 是否管理员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@JsonIgnore
|
||||
@ -272,6 +274,7 @@ public class AccountVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 是否超级管理员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@JsonIgnore
|
||||
|
@ -4,6 +4,7 @@ import club.joylink.rtss.constants.Client;
|
||||
import club.joylink.rtss.entity.SysAccountLogin;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.util.EncryptUtil;
|
||||
import club.joylink.rtss.vo.client.org.OrgProjectVO;
|
||||
import club.joylink.rtss.vo.client.project.ProjectDeviceVO;
|
||||
import club.joylink.rtss.vo.project.ProjectVO;
|
||||
import lombok.Getter;
|
||||
@ -49,6 +50,9 @@ public class LoginUserInfoVO {
|
||||
private LocalDateTime preLogoutTime;
|
||||
private LocalDateTime lastQueryTime; // 最后使用时间
|
||||
|
||||
// 20220929 增加
|
||||
private OrgProjectVO orgProjectVO;
|
||||
|
||||
public LoginUserInfoVO(AccountVO accountVO, Client client, String project, ProjectDeviceVO deviceVO) {
|
||||
this.accountVO = accountVO;
|
||||
this.client = client;
|
||||
@ -139,4 +143,14 @@ public class LoginUserInfoVO {
|
||||
public boolean isWechatLogin() {
|
||||
return Client.Assistant.equals(this.getClient());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取顶级组织Id
|
||||
*/
|
||||
public Long getTopOrgId() {
|
||||
if (orgProjectVO == null) {
|
||||
return null;
|
||||
}
|
||||
return orgProjectVO.getTopOrgId();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package club.joylink.rtss.vo.client.org;
|
||||
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OrgProjectVO {
|
||||
private Long topOrgId;
|
||||
|
||||
private Long orgId;
|
||||
|
||||
|
||||
private String projectCode;
|
||||
|
||||
public OrgProjectVO(OrgProject orgProject) {
|
||||
this.orgId = orgProject.getOrgId();
|
||||
this.projectCode = orgProject.getProjectCode();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user