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

20191009 修改验证码的发送逻辑

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