参数收集清单、未符合项viewer角色下查找数据
This commit is contained in:
+3
@@ -301,4 +301,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
boolean isRegulationOwner(LoginUser currentUser);
|
||||
|
||||
void setBrandAndDutyTerritory(String roles, String dutyTerritories, String brands, List<ProjectUserBrand> projectUserBrandList, List<ProjectUserDutyTerritory> projectUserDutyTerritoryList, String userId);
|
||||
|
||||
boolean isViewer(String userId);
|
||||
|
||||
}
|
||||
|
||||
+13
@@ -749,4 +749,17 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewer(String userId) {
|
||||
boolean boo = false;
|
||||
List<SysRole> roles = sysRoleMapper.getRoleByUserId(userId);
|
||||
if (ObjectUtils.isNotEmpty(roles)) {
|
||||
List<String> roleCodes = roles.stream().map(SysRole::getRoleCode).collect(Collectors.toList());
|
||||
if (ObjectUtils.isNotEmpty(roleCodes) && roleCodes.contains(ProjectRoleEnum.VIEWER.getCode())) {
|
||||
boo = true;
|
||||
}
|
||||
}
|
||||
return boo;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user