From df6ca3695650c48581d2d43a07a577b9b047347c Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Thu, 2 Jan 2025 09:13:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E6=95=88=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/service/SystemTime.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/service/SystemTime.go b/api/service/SystemTime.go index 9fc3910..ded55b4 100644 --- a/api/service/SystemTime.go +++ b/api/service/SystemTime.go @@ -38,6 +38,10 @@ func (r *SystemTimeService) CheckVoteValidStatus() bool { return false } + if duration > 5*time.Minute { + duration = 5 * time.Minute + } + // 添加缓存 _, err = global.Redis.Set(context.Background(), redisKey, "1", duration).Result() if err != nil {