瀏覽代碼

APP去掉验证码

wuhb 4 月之前
父節點
當前提交
db2f98cbd0

+ 2 - 0
ygtx-common/src/main/java/com/ygtx/common/constant/UserConstants.java

@@ -88,5 +88,7 @@ public class UserConstants
     public static final String MESSAGE_STATUS_READ = "READ";//已读
     public static final String MESSAGE_STATUS_PROCEED = "PROCEED";//已处理
 
+    public static final String APP_CODE = "app20251203";
+
     public static final String NO = "N";
 }

+ 7 - 4
ygtx-framework/src/main/java/com/ygtx/framework/web/service/SysLoginService.java

@@ -30,7 +30,7 @@ import com.ygtx.system.service.ISysUserService;
 
 /**
  * 登录校验方法
- * 
+ *
  * @author ruoyi
  */
 @Component
@@ -44,7 +44,7 @@ public class SysLoginService
 
     @Autowired
     private RedisCache redisCache;
-    
+
     @Autowired
     private ISysUserService userService;
 
@@ -53,7 +53,7 @@ public class SysLoginService
 
     /**
      * 登录验证
-     * 
+     *
      * @param username 用户名
      * @param password 密码
      * @param code 验证码
@@ -101,7 +101,7 @@ public class SysLoginService
 
     /**
      * 校验验证码
-     * 
+     *
      * @param username 用户名
      * @param code 验证码
      * @param uuid 唯一标识
@@ -109,6 +109,9 @@ public class SysLoginService
      */
     public void validateCaptcha(String username, String code, String uuid)
     {
+        if(UserConstants.APP_CODE.equals(code)){
+            return;
+        }
         boolean captchaEnabled = configService.selectCaptchaEnabled();
         if (captchaEnabled)
         {