修复验证码 超过50秒不自动更新BUG

This commit is contained in:
gaoxiongzaq 2024-03-29 11:19:39 +08:00
parent 59315c3200
commit 2d8f8d7362

View File

@ -110,7 +110,7 @@ public class FileController {
long timeDifference = DateUtils.calculateCurrentTimeDifference(captchaGenerateTime);
// 验证码为空且生成验证码超过50秒重新生成验证码
if (timeDifference > 50 && ObjectUtils.isEmpty(captchaCode)) {
if (timeDifference > 50 || ObjectUtils.isEmpty(captchaCode)) {
captchaCode = CaptchaUtil.generateCaptchaCode();
// 更新验证码
WebUtils.setSessionAttr(request, CAPTCHA_CODE, captchaCode);