【选择组织修改登录信息】

This commit is contained in:
weizhihong 2022-10-17 14:23:57 +08:00
parent bc0969e6e5
commit 7547b6b14b
2 changed files with 19 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package club.joylink.rtss.vo;
import club.joylink.rtss.constants.BusinessConsts;
import club.joylink.rtss.entity.Org;
import club.joylink.rtss.entity.SysAccount;
import club.joylink.rtss.vo.client.org.OrgProjectVO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@ -319,4 +320,17 @@ public class AccountVO implements Serializable {
public boolean isThirdChildAccount() {
return Type_3.equalsIgnoreCase(this.type) && StringUtils.hasText(this.parentAccount);
}
public void setOrgProjectVO(OrgProjectVO orgProjectVO) {
if (orgProjectVO != null) {
this.companyId = orgProjectVO.getOrgId();
this.companyName = orgProjectVO.getName();
this.companyAdmin = !CollectionUtils.isEmpty(orgProjectVO.getRole())
&& orgProjectVO.getRole().contains(BusinessConsts.OrgRole.Admin.name());
} else {
this.companyId = 0L;
this.companyName = null;
this.companyAdmin = false;
}
}
}

View File

@ -153,4 +153,9 @@ public class LoginUserInfoVO {
}
return orgProjectVO.getTopOrgId();
}
public void setOrgProjectVO(OrgProjectVO orgProjectVO) {
this.orgProjectVO = orgProjectVO;
this.accountVO.setOrgProjectVO(orgProjectVO);
}
}