|
@@ -113,9 +113,22 @@ public class SsoController {
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("角色不能为空");
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("角色不能为空");
|
|
}
|
|
}
|
|
Long schoolId = SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId()));
|
|
Long schoolId = SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId()));
|
|
- SysOrg sysOrg = sysOrgService.findCollegeLevelOrgByOrgId(sysOrgService.getOne(new QueryWrapper<SysOrg>().lambda()
|
|
|
|
|
|
+
|
|
|
|
+ SysOrg sysOrg = sysOrgService.getOne(new QueryWrapper<SysOrg>()
|
|
|
|
+ .lambda()
|
|
.eq(SysOrg::getSchoolId,schoolId)
|
|
.eq(SysOrg::getSchoolId,schoolId)
|
|
- .eq(SysOrg::getName,orgName)).getId());
|
|
|
|
|
|
+ .eq(SysOrg::getName,orgName));
|
|
|
|
+ if (Objects.isNull(sysOrg)){
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("机构不存在");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 不是教务处老师查询开课学院
|
|
|
|
+ if (!RoleTypeEnum.OFFICE_TEACHER.equals(role)){
|
|
|
|
+ sysOrg = sysOrgService.findCollegeLevelOrgByOrgId(sysOrgService.getOne(new QueryWrapper<SysOrg>().lambda()
|
|
|
|
+ .eq(SysOrg::getSchoolId,schoolId)
|
|
|
|
+ .eq(SysOrg::getName,orgName)).getId());
|
|
|
|
+ }
|
|
|
|
+
|
|
if (Objects.isNull(orgName) || Objects.equals(orgName, "")) {
|
|
if (Objects.isNull(orgName) || Objects.equals(orgName, "")) {
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("学院名称不能为空");
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("学院名称不能为空");
|
|
}
|
|
}
|