fix: Bug #432 门诊手术安排新增保存报错 - 修复登录用户null校验缺失导致NPE

This commit is contained in:
guanyu
2026-04-24 15:17:17 +08:00
parent 1242d41499
commit dc7e3c1de8
2 changed files with 8 additions and 6 deletions

View File

@@ -136,9 +136,11 @@ public class SurgicalScheduleAppServiceImpl implements ISurgicalScheduleAppServi
} }
} }
LoginUser loginUser = new LoginUser(); // Bug #432 修复获取当前登录用户信息增加null校验防止NPE
//获取当前登录用户信息 LoginUser loginUser = SecurityUtils.getLoginUser();
loginUser = SecurityUtils.getLoginUser(); if (loginUser == null) {
return R.fail("用户未登录或登录已过期");
}
// 当前登录用户ID // 当前登录用户ID
Long userId = loginUser.getUserId(); Long userId = loginUser.getUserId();