教研室账号校验改为用角色校验

This commit is contained in:
2026-09-18 19:31:53 +08:00
parent 5a3d202599
commit 7096873e2c
3 changed files with 16 additions and 2 deletions
@@ -103,7 +103,12 @@ public class JwglRoleHelper {
if (StringUtils.isEmpty(username) || jysdlbMapper == null) {
return null;
}
return jysdlbMapper.selectResearchOfficeIdByAccount(username);
String officeId = jysdlbMapper.selectResearchOfficeIdByAccount(username);
// 教研室角色账号按所属部门解析教研室;普通教员不得走此通道
if (StringUtils.isEmpty(officeId) && hasRoleKey(ROLE_RESEARCH_OFFICE)) {
officeId = jysdlbMapper.selectResearchOfficeIdByUserDept(username);
}
return officeId;
} catch (Exception ignored) {
return null;
}