提交 e65eca7c 编写于 作者: rushui.chen's avatar rushui.chen

20191009 修改验证码的发送逻辑

上级 cb70b856
流水线 #15556 已失败 于阶段
in 0 second
...@@ -88,8 +88,8 @@ public class SysCodeController extends AccountBaseController { ...@@ -88,8 +88,8 @@ public class SysCodeController extends AccountBaseController {
if (cacheClient.exists(authCodeKey)) { if (cacheClient.exists(authCodeKey)) {
Long time = cacheClient.get(this.getAuthCodeKey(mobilePhone, flag.toString()) + "-secure", Long.class); Long time = cacheClient.get(this.getAuthCodeKey(mobilePhone, flag.toString()) + "-secure", Long.class);
if (time == null) { if (time == null) {
time = 0L; processSendAuthCode(mobilePhone, flag, authCodeKeySecure);
} }else{
int remainTime = 59 - (int) (System.currentTimeMillis() - time) / 1000; int remainTime = 59 - (int) (System.currentTimeMillis() - time) / 1000;
if (remainTime > 0) { if (remainTime > 0) {
throw new AccountException(AccountExceptionEnum.PICA_SYSCODE_RETRY.getCode(), throw new AccountException(AccountExceptionEnum.PICA_SYSCODE_RETRY.getCode(),
...@@ -97,6 +97,7 @@ public class SysCodeController extends AccountBaseController { ...@@ -97,6 +97,7 @@ public class SysCodeController extends AccountBaseController {
} else { } else {
processSendAuthCode(mobilePhone, flag, authCodeKeySecure); processSendAuthCode(mobilePhone, flag, authCodeKeySecure);
} }
}
} else { } else {
processSendAuthCode(mobilePhone, flag, authCodeKeySecure); processSendAuthCode(mobilePhone, flag, authCodeKeySecure);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册