|
@@ -9,6 +9,7 @@ import com.qmth.teachcloud.common.entity.BasicSchool;
|
|
|
import com.qmth.teachcloud.common.entity.SysOrg;
|
|
|
import com.qmth.teachcloud.common.entity.SysUser;
|
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
+import com.qmth.teachcloud.common.enums.OrgTypeEnum;
|
|
|
import com.qmth.teachcloud.common.enums.RoleTypeEnum;
|
|
|
import com.qmth.teachcloud.common.enums.userPush.SpecialPrivilegeEnum;
|
|
|
import com.qmth.teachcloud.common.service.CommonCacheService;
|
|
@@ -105,6 +106,8 @@ public class SsoServiceImpl implements SsoService {
|
|
|
SysOrg sysOrg = commonCacheService.orgCache(sysUser.getOrgId());
|
|
|
if (Objects.isNull(sysOrg)) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("未找到学校信息");
|
|
|
+ } else if (Objects.nonNull(sysOrg) && sysOrg.getType() != OrgTypeEnum.SCHOOL) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("教务处老师应放在顶级机构");
|
|
|
}
|
|
|
orgName = sysOrg.getName();
|
|
|
}
|