diff --git a/api/service/SystemTime.go b/api/service/SystemTime.go index 74840f8..d86a80c 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 {