| | |
| | | */
|
| | | private Long tenantId;
|
| | |
|
| | | /**
|
| | | * 当前部门id
|
| | | */
|
| | | private Long currentDeptId;
|
| | | /** |
| | | * 当前部门id |
| | | */ |
| | | private Long currentDeptId; |
| | | |
| | | /** |
| | | * 是否开通AI功能(0否 1是) |
| | | */ |
| | | private Integer aiEnabled; |
| | | |
| | | private String dataScope; |
| | |
|
| | | public LoginUser()
|
| | | {
|
| | | }
|
| | |
|
| | | public LoginUser(SysUser user, Set<String> permissions)
|
| | | {
|
| | | this.user = user;
|
| | | this.permissions = permissions;
|
| | | }
|
| | | public LoginUser(SysUser user, Set<String> permissions) |
| | | { |
| | | this.user = user; |
| | | this.permissions = permissions; |
| | | this.aiEnabled = user == null ? null : user.getAiEnabled(); |
| | | } |
| | |
|
| | | public LoginUser(Long userId, Long [] deptId, SysUser user, Set<String> permissions)
|
| | | {
|
| | | this.userId = userId;
|
| | | this.deptIds = deptId;
|
| | | this.user = user;
|
| | | this.permissions = permissions;
|
| | | }
|
| | | public LoginUser(Long userId, Long [] deptId, SysUser user, Set<String> permissions) |
| | | { |
| | | this.userId = userId; |
| | | this.deptIds = deptId; |
| | | this.user = user; |
| | | this.permissions = permissions; |
| | | this.aiEnabled = user == null ? null : user.getAiEnabled(); |
| | | } |
| | |
|
| | | public LoginUser(Long userId, Long [] deptIds, SysUser user,Long tenantId, Set<String> permissions)
|
| | | {
|
| | | this.userId = userId;
|
| | | this.deptIds = deptIds;
|
| | | this.user = user;
|
| | | this.permissions = permissions;
|
| | | this.tenantId = tenantId;
|
| | | }
|
| | | public LoginUser(Long userId, Long [] deptIds, SysUser user,Long tenantId, Set<String> permissions) |
| | | { |
| | | this.userId = userId; |
| | | this.deptIds = deptIds; |
| | | this.user = user; |
| | | this.permissions = permissions; |
| | | this.tenantId = tenantId; |
| | | this.aiEnabled = user == null ? null : user.getAiEnabled(); |
| | | } |
| | |
|
| | | public LoginUser(Long userId, Long [] deptIds, SysUser user,Long tenantId,Long currentDeptId, Set<String> permissions)
|
| | | {
|
| | | this.userId = userId;
|
| | | this.deptIds = deptIds;
|
| | | this.user = user;
|
| | | this.permissions = permissions;
|
| | | this.tenantId = tenantId;
|
| | | this.currentDeptId = currentDeptId;
|
| | | }
|
| | | public LoginUser(Long userId, Long [] deptIds, SysUser user,Long tenantId,Long currentDeptId, Set<String> permissions) |
| | | { |
| | | this.userId = userId; |
| | | this.deptIds = deptIds; |
| | | this.user = user; |
| | | this.permissions = permissions; |
| | | this.tenantId = tenantId; |
| | | this.currentDeptId = currentDeptId; |
| | | this.aiEnabled = user == null ? null : user.getAiEnabled(); |
| | | } |
| | |
|
| | | public Long getUserId()
|
| | | {
|
| | |
| | | return user;
|
| | | }
|
| | |
|
| | | public void setUser(SysUser user)
|
| | | {
|
| | | this.user = user;
|
| | | }
|
| | | public void setUser(SysUser user) |
| | | { |
| | | this.user = user; |
| | | this.aiEnabled = user == null ? null : user.getAiEnabled(); |
| | | } |
| | |
|
| | | @Override
|
| | | public Collection<? extends GrantedAuthority> getAuthorities()
|
| | |
| | | return currentDeptId;
|
| | | }
|
| | |
|
| | | public void setCurrentDeptId(Long currentDeptId) {
|
| | | this.currentDeptId = currentDeptId;
|
| | | }
|
| | | }
|
| | | public void setCurrentDeptId(Long currentDeptId) { |
| | | this.currentDeptId = currentDeptId; |
| | | } |
| | | |
| | | public Integer getAiEnabled() { |
| | | if (aiEnabled != null) { |
| | | return aiEnabled; |
| | | } |
| | | if (user != null && user.getAiEnabled() != null) { |
| | | return user.getAiEnabled(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public void setAiEnabled(Integer aiEnabled) { |
| | | this.aiEnabled = aiEnabled; |
| | | } |
| | | |
| | | public String getDataScope() { |
| | | return dataScope; |
| | | } |
| | | |
| | | public void setDataScope(String dataScope) { |
| | | this.dataScope = dataScope; |
| | | } |
| | | } |