登录null修复

This commit is contained in:
guoshengxiong 2025-10-22 18:14:33 +08:00
parent 13f7360162
commit 01c3547352

View File

@ -543,8 +543,14 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
if (systemUser != null && systemUser.getWorkerId() != null) {
result.put("workerId", systemUser.getWorkerId().toString());
WorkerInfo workerInfo = workerInfoMapper.selectById(systemUser.getWorkerId());
result.put("enterpriseId", workerInfo.getEnterpriseId());
result.put("workerNature", workerInfo == null ? null : workerInfo.getWorkerNature());
Long enterpriseId = null;
Integer workerNature = null;
if (workerInfo != null) {
enterpriseId = workerInfo.getEnterpriseId();
workerNature = workerInfo.getWorkerNature();
}
result.put("enterpriseId", enterpriseId);
result.put("workerNature", workerNature);
} else {
result.put("workerId", "");
result.put("workerNature", null);