登录处理短信验证码

master
shijie 4 years ago
parent dc1f175e52
commit 2c57c2ac30
  1. 6
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java

@ -72,9 +72,9 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
if (count == 0) {
ExceptionCast.cast(HrmsCode.PHNOE_ACCOUNT_NOT_EXIST);
}
//判断验证码是否匹配
String verify = "123456";
if(!verify.equals(user.getVerifyCode())){
//校验验证码是否正确
Boolean isCodeTrue = SendUtil.validCode(user.getPhoneAccount(),user.getVerifyCode());
if(!isCodeTrue){
ExceptionCast.cast(HrmsCode.VERIFY_CODE_ILLEGAL);
}
return user;

Loading…
Cancel
Save