dongxin 1 год назад
Родитель
Сommit
da63e67c5a

+ 6 - 6
linkwe-auth/src/main/java/com/linkwechat/web/service/SysLoginService.java

@@ -102,11 +102,11 @@ public class SysLoginService {
             throw new WeComException("密码解密失败!");
         }
 
-//        if ("admin".equals(userName)) {
-//            if (!SecurityUtils.matchesPassword(password, sysUser.getPassword())) {
-//                throw new WeComException("用户名或密码错误,请重新输入");
-//            }
-//        }else {
+        if ("admin".equals(userName)) {
+            if (!SecurityUtils.matchesPassword(password, sysUser.getPassword())) {
+                throw new WeComException("用户名或密码错误,请重新输入");
+            }
+        }else {
             if (StringUtils.isEmpty(sysUser.getPassword())) {
                 // 设置默认密码
                 sysUser.setPassword(new BCryptPasswordEncoder().encode("zmbx@Z023"));
@@ -117,7 +117,7 @@ public class SysLoginService {
                     throw new WeComException("用户名或密码错误,请重新输入");
                 }
             }
-//        }
+        }
         LoginUser sysUserVo = findLoginUser(sysUser);
 
         // 生成token