소스 검색

修复问题

xiaochan 5 달 전
부모
커밋
0a40162d34
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      src/main/java/thyyxxk/webserver/service/LoginService.java

+ 4 - 2
src/main/java/thyyxxk/webserver/service/LoginService.java

@@ -66,11 +66,13 @@ public class LoginService {
         } catch (Exception ignored) {
         }
         tempUserInfo.setDeptName(deptCache.get(tempUserInfo.getDeptCode()).getName());
-        Set<String> deptList = publicServer.getDept(true, userInfo);
+        Set<String> deptList = publicServer.getDept(true, tempUserInfo);
         if (!deptList.isEmpty()) {
             Map<String, String> tempMap = new HashMap<>(deptList.size());
             deptList.forEach(item -> {
-                tempMap.put(item, deptCache.getDeptName(item));
+                if (item != null) {
+                    tempMap.put(item, deptCache.getDeptName(item));
+                }
             });
             tempUserInfo.setPartTimeDeptMap(tempMap);
         }