feat: 提案配置不存在、校领导单位列表为 null 或为空时,记录警告并跳过角色刷新,继续人员全量更新

This commit is contained in:
2026-10-22 17:50:19 +08:00
parent 98c7804c28
commit 018ee96402
3 changed files with 15 additions and 10 deletions
@@ -351,8 +351,12 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
// 6. 处理其他任务
// 6.1 更新提案的校领导角色,发送订阅
ProposalConfig config = dao.fetch(ProposalConfig.class, Cnd.where("delFlag", "=", false).desc("updatedAt"));
for (String unitId : config.getSchoolLeaderUnitIds()) {
RoleEventPublisher.broadcast(new RoleEventMsg(unitId, RoleConstant.PROPOSAL_BRANCH_SCHOOL_LEADER.name(), RoleEventMsg.RENEW_ROLE));
if (config == null || config.getSchoolLeaderUnitIds() == null || config.getSchoolLeaderUnitIds().isEmpty()) {
log.warn("未配置提案校领导单位,跳过校领导角色刷新,继续完成人员全量更新");
} else {
for (String unitId : config.getSchoolLeaderUnitIds()) {
RoleEventPublisher.broadcast(new RoleEventMsg(unitId, RoleConstant.PROPOSAL_BRANCH_SCHOOL_LEADER.name(), RoleEventMsg.RENEW_ROLE));
}
}
/*
+5 -5
View File
@@ -34,11 +34,11 @@ sdk:
appSecret: a65cec4fb69980bd88258fc8433a3eef
redirectUri: /platform/wx/oauth2/callback
cas:
enable: false
server-url-prefix: https://i.zjnu.njupt.edu.cn/cas
server-login-url: https://i.zjnu.njupt.edu.cn/cas/login
qi-wx-server-login-url: httos:/cas.zjnu.whcp.eou.cn/lyuapServer/wechatauz/wxAuthRedirect
client-host-url: https://zhgh.zjnu.njupt.edu.cn
enable: true
server-url-prefix: https://authserver.zjnu.edu.cn/authserver
server-login-url: https://authserver.zjnu.edu.cn/authserver/login
qi-wx-server-login-url: https://authserver.zjnu.edu.cn/authserver/login
client-host-url: https://lxy.zjnu.edu.cn
client-call-back-url: /platform/sso/login
validation-type: cas
minio:
+4 -3
View File
@@ -35,10 +35,11 @@
<!-- 框架日志级别(按需调整) -->
<logger name="org.eclipse.jetty" level="INFO"/>
<logger name="org.quartz" level="INFO"/>
<logger name="org.nutz" level="INFO"/>
<logger name="org.nutz" level="DEBUG"/>
<!-- root logger:INFO 级别,仅输出到文件,避免控制台阻塞 -->
<root level="INFO">
<!-- root logger:DEBUG 级别,输出到控制台和全量文件 -->
<root level="DEBUG">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ALL_FILE"/>
</root>