Quellcode durchsuchen

fix: 修复注册首次获取验证码验证不通过

李书文 vor 1 Jahr
Ursprung
Commit
de23782bca

+ 1 - 1
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserService.java

@@ -214,7 +214,7 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
         String smsCode = RedisUtil.get(PREFIX + registerDto.getPhone());
         if (smsCode == null) throw new RuntimeException("验证码已过期,请重新发送!");
         //比对验证码
-        if (!registerDto.getSmsCode().toString().equals(smsCode)) throw new SecurityException("验证码输入错误,请检查!");
+        if (registerDto.getSmsCode()!=Integer.parseInt(smsCode)) throw new SecurityException("验证码输入错误,请检查!");
         //4.开始新增
         AppUser appUser = new AppUser();
         //手机号