xiaof 3 жил өмнө
parent
commit
cb9f4ed6d2

+ 1 - 1
distributed-print/src/main/resources/application-test.properties

@@ -77,7 +77,7 @@ sys.config.adminLogoUrl=http://qmth-test.oss-cn-shenzhen.aliyuncs.com/frontend/w
 sys.config.htmlToPdfUrl=/usr/local/bin/wkhtmltopdf
 sys.config.autoCreatePdfResetMaxCount=5
 sys.config.threadPoolCoreSize=1
-sys.config.customThreadPoolCoreSize=false
+sys.config.customThreadPoolCoreSize=true
 sys.config.sessionActive=4h
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
 

+ 7 - 6
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java

@@ -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()));