| | |
| | | * 用户融云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() { |
| | |
| | | |
| | | 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) { |
| | | List<SysRole> roles = this.getRoles(); |
| | | if(roles==null) |
| | | {return false;} |
| | | boolean appLeader = roles.stream().anyMatch(sysRole -> sysRole.getRoleKey().contains("appLeader")); |
| | | return userId != null && appLeader; |
| | | } |
| | | |
| | | public Long getDeptId() { |