| | |
| | | * 用户融云token |
| | | */ |
| | | private String rongCloudToken; |
| | | /** |
| | | * app用户类型 |
| | | * 0-app指挥端 1-app单兵端 空-pc端 |
| | | */ |
| | | private String appUserType; |
| | | /** |
| | | * 关联报警类型组 |
| | | */ |
| | | private List<String> commands; |
| | | |
| | | public SysUser() { |
| | | |
| | | } |
| | | |
| | | public String getAppUserType() { |
| | | return appUserType; |
| | | } |
| | | |
| | | public void setAppUserType(String appUserType) { |
| | | this.appUserType = appUserType; |
| | | } |
| | | |
| | | public List<String> getCommands() { |
| | | return commands; |
| | | } |
| | | |
| | | public void setCommands(List<String> commands) { |
| | | this.commands = commands; |
| | | } |
| | | |
| | | public String getRongCloudToken() { |
| | |
| | | |
| | | public static boolean isAdmin(String userId) { |
| | | return userId != null && userId.equals("1"); |
| | | } |
| | | |
| | | /** |
| | | * 是否app指挥端 |
| | | */ |
| | | public boolean isAppLeader() { |
| | | return isAppLeader(this.userId); |
| | | } |
| | | |
| | | public boolean isAppLeader(String userId) { |
| | | return userId != null && this.getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().contains("appLeader")); |
| | | } |
| | | |
| | | public Long getDeptId() { |