fix gao user invite

This commit is contained in:
Timi
2026-08-21 21:54:09 +08:00
parent 1b8936f197
commit 3a3809b661
5 changed files with 43 additions and 13 deletions
@@ -65,6 +65,9 @@ public class SmsServiceImplement implements SmsService {
NotifyQueueConfig.Sms.Captcha captchaConf = config.getSms().getCaptcha();
NotifyDetail detail = notifyDetailService.get(detailId);
TimiException.required(detail, "短信验证码无效");
TimiException.required(detail.getSendAt(), "短信验证码无效");
TimiException.requiredTrue(NotifyDetail.MsgType.SMS == detail.getMsgType(), "短信验证码无效");
if (Time.M * captchaConf.getTtlMinute() < Time.now() - detail.getSendAt()) {
throw new TimiException(TimiCode.ARG_EXPIRED, "验证码过期");
}