|
@@ -257,14 +257,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
throw ExceptionResultEnum.ERROR.exception("找不到此课程信息");
|
|
|
}
|
|
|
|
|
|
- List<SysOrg> sysOrgList = sysOrgService.findByConnectByRootOrgId(basicCourse.getTeachingRoomId());
|
|
|
- Set<Long> orgIds = sysOrgList.stream().map(s -> s.getId()).collect(Collectors.toSet());
|
|
|
- List<ApproveUserResult> sysUserList = sysUserService.filterFlowPrivilege(schoolId, orgIds, false, null, null);
|
|
|
- if (Objects.isNull(sysUserList) || sysUserList.size() == 0) {
|
|
|
+ int count = this.countByTeachingRoomId(basicCourse.getTeachingRoomId());
|
|
|
+ List<SysOrg> sysOrgList = null;
|
|
|
+ if (count == 0) {
|
|
|
sysOrgList = sysOrgService.findByConnectByParentId(basicCourse.getTeachingRoomId(), true, true);
|
|
|
- orgIds = sysOrgList.stream().map(s -> s.getId()).collect(Collectors.toSet());
|
|
|
- sysUserList = sysUserService.filterFlowPrivilege(schoolId, orgIds, false, null, null);
|
|
|
+ } else {
|
|
|
+ sysOrgList = sysOrgService.findByConnectByRootOrgId(basicCourse.getTeachingRoomId());
|
|
|
}
|
|
|
+ Set<Long> orgIds = sysOrgList.stream().map(s -> s.getId()).collect(Collectors.toSet());
|
|
|
+ List<ApproveUserResult> sysUserList = sysUserService.filterFlowPrivilege(schoolId, orgIds, false, null, null);
|
|
|
List<BlurryUserDto> blurryUserDtoList = new ArrayList<>();
|
|
|
for (ApproveUserResult sysUser : sysUserList) {
|
|
|
blurryUserDtoList.add(new BlurryUserDto(sysUser.getId(), sysUser.getLoginName(), sysUser.getRealName()));
|