소스 검색

修复AD同步小BUG

wukai 1 개월 전
부모
커밋
5b09cbf60a

+ 0 - 2
jjt-biz/src/main/java/com/jjt/ad/domain/AdUserInfo.java

@@ -64,6 +64,4 @@ public class AdUserInfo {
 
     @Alias("SAM_ACCOUNT_NAME")
     private String samAccountName;
-
-    private Long deptId;
 }

+ 3 - 3
jjt-biz/src/main/java/com/jjt/ad/service/impl/AdSyncServiceImpl.java

@@ -107,11 +107,11 @@ public class AdSyncServiceImpl implements IAdSyncService {
             user.setUserName(info.getSamAccountName());
             user.setNickName(info.getDisplayName());
             user.setEmail(info.getLogonName());
-            if (info.getMobile().length() < 11) {
+            if (info.getMobile().length() > 11) {
+                user.setPassword(SecurityUtils.encryptPassword("123456"));
+            } else {
                 user.setPhonenumber(info.getMobile());
                 user.setPassword(SecurityUtils.encryptPassword(info.getMobile()));
-            } else {
-                user.setPassword(SecurityUtils.encryptPassword("123456"));
             }
             Set<Long> roles = new HashSet<>();
             roles.add(commonRole.getRoleId());