xiaochan hace 5 meses
padre
commit
0a40162d34
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  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);
         }