Procházet zdrojové kódy

启动验证码

master
zongjl před 2 roky
rodič
revize
8be1c2782f
1 změnil soubory, kde provedl 6 přidání a 8 odebrání
  1. +6
    -8
      tuoheng-system/src/main/java/com/tuoheng/system/service/impl/LoginServiceImpl.java

+ 6
- 8
tuoheng-system/src/main/java/com/tuoheng/system/service/impl/LoginServiceImpl.java Zobrazit soubor

@@ -89,14 +89,12 @@ public class LoginServiceImpl extends ServiceImpl<UserMapper, User> implements I
return JsonResult.error("验证码KEY不能为空");
}
// 验证码
if (!loginDto.getCaptcha().equals("520")) {
if (StringUtils.isEmpty(loginDto.getCaptcha())) {
return JsonResult.error("验证码不能为空");
}
// 验证码校验
if (!loginDto.getCaptcha().toLowerCase().equals(redisUtils.get(loginDto.getKey()).toString().toLowerCase())) {
return JsonResult.error("验证码不正确");
}
if (StringUtils.isEmpty(loginDto.getCaptcha())) {
return JsonResult.error("验证码不能为空");
}
// 验证码校验
if (!loginDto.getCaptcha().toLowerCase().equals(redisUtils.get(loginDto.getKey()).toString().toLowerCase())) {
return JsonResult.error("验证码不正确");
}

try {

Načítá se…
Zrušit
Uložit