Commit fe69e13d authored by 技术部-任文超's avatar 技术部-任文超

"1分钟内不能重复获取验证码"的返回状态码由“0000 -- 成功”调整为“0001 -- 失败”

parent 2ca85f0f
......@@ -138,7 +138,7 @@ public class SmsController implements IBaseController {
String key = Constants.REDIS_PREFIX_VERIFICATION_CODE + phoneNo;
long expire = redisTemplate.getExpire(key, TimeUnit.MINUTES);
if (expire >= EXPIRE_MINUTES - 1) {
return JsonResult.buildSuccessResult("1分钟内不能重复获取验证码", null);
return JsonResult.buildErrorStateResult("1分钟内不能重复获取验证码", null);
}
String randomCode = smsIsDebug ? "0000" : String.valueOf(random.nextInt(8999) + 1000);
String uniqueId = phoneNo + UUID.randomUUID().toString().replaceAll("-", "");
......@@ -174,7 +174,7 @@ public class SmsController implements IBaseController {
String key = Constants.REDIS_PREFIX_VERIFICATION_CODE + phoneNo;
long expire = redisTemplate.getExpire(key, TimeUnit.MINUTES);
if (expire >= EXPIRE_MINUTES - 1) {
return JsonResult.buildSuccessResult("1分钟内不能重复获取验证码", null);
return JsonResult.buildErrorStateResult("1分钟内不能重复获取验证码", null);
}
String randomCode = smsIsDebug ? "0000" : String.valueOf(random.nextInt(8999) + 1000);
String uniqueId = phoneNo + UUID.randomUUID().toString().replaceAll("-", "");
......@@ -254,7 +254,7 @@ public class SmsController implements IBaseController {
long expire = redisTemplate.getExpire(key, TimeUnit.MINUTES);
if (expire >= EXPIRE_MINUTES - 1) {
LOGGER.info("sendVerificationCode2New1分钟内不能重复获取验证码:phoneNo:{},deviceId:{},ip:{}",phoneNo,deviceId,getIp());
return JsonResult.buildSuccessResult("1分钟内不能重复获取验证码", null);
return JsonResult.buildErrorStateResult("1分钟内不能重复获取验证码", null);
}
String randomCode = smsIsDebug ? "0000" : String.valueOf(random.nextInt(8999) + 1000);
String uniqueId = phoneNo + UUID.randomUUID().toString().replaceAll("-", "");
......@@ -316,7 +316,7 @@ public class SmsController implements IBaseController {
String key = Constants.REDIS_PREFIX_VERIFICATION_CODE + phoneNo;
long expire = redisTemplate.getExpire(key, TimeUnit.MINUTES);
if (expire >= EXPIRE_MINUTES - 1) {
return JsonResult.buildSuccessResult("1分钟内不能重复获取验证码", null);
return JsonResult.buildErrorStateResult("1分钟内不能重复获取验证码", null);
}
String randomCode = smsIsDebug ? "0000" : String.valueOf(random.nextInt(8999) + 1000);
String uniqueId = phoneNo + UUID.randomUUID().toString().replaceAll("-", "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment