更换短信验证码
This commit is contained in:
@@ -232,7 +232,6 @@ public class MyUserController {
|
||||
return R.error(500,"短信验证码频率过高,请稍后再试!");
|
||||
}
|
||||
}
|
||||
|
||||
//生成随机六位数
|
||||
Random random = new Random();
|
||||
String i = random.nextInt(999999) + "";
|
||||
@@ -242,14 +241,10 @@ public class MyUserController {
|
||||
}
|
||||
i = sb.toString() + i;
|
||||
String code = i + "_"+System.currentTimeMillis();
|
||||
|
||||
//redis 缓存验证码
|
||||
redisTemplate.opsForValue().set("RegistCode"+phone,code,5, TimeUnit.MINUTES);
|
||||
|
||||
//发送
|
||||
userService.sendCodeForRegister(phone,code,areacode);
|
||||
|
||||
return R.ok();
|
||||
return userService.sendCodeForRegister(phone,code,areacode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user