he.dujuan 3 gadi atpakaļ
vecāks
revīzija
e9397a29b9

+ 4 - 1
eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/ZkDataSyncTask.java

@@ -263,7 +263,10 @@ public class ZkDataSyncTask {
                 JSONObject userData = content.getJSONObject(i);
 
                 user.setId(userData.getString("id"));
-                user.setUsername(userData.getString("username"));
+                if(userData.containsKey("username")) {
+                    user.setUsername(userData.getString("username"));
+                    System.out.println("账号:"+userData.getString("username"));
+                }
                 user.setPassword(passwordEncoder.encode("12345678"));
                 user.setOrgPassword("12345678");
                 Set<Job> jobs = new HashSet<>(JSONArray.parseArray(userData.getString("jobs"),Job.class));