From ecd20b2802161f9f2cf644dcd689d010384b7ccb Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Thu, 12 Dec 2024 15:59:56 +0800 Subject: [PATCH] update get egg score week --- utils/es/base.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/es/base.go b/utils/es/base.go index 6f79ca1..47ac087 100644 --- a/utils/es/base.go +++ b/utils/es/base.go @@ -20,11 +20,11 @@ func GetLatestEffectiveIndexFromAlias(now time.Time) string { var esIndexName string year, week := now.ISOWeek() if now.Weekday() > time.Wednesday || (now.Weekday() > time.Wednesday && now.Hour() > 14) { - // 当前已经过了周三下午两点 返回当周蛋蛋分 - esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week) - } else { - // 没过周三下午两点 返回上周蛋蛋分 + // 当前已经过了周三下午两点 返回上周蛋蛋分 esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-1) + } else { + // 没过周三下午两点 返回上上周蛋蛋分 + esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-2) } return esIndexName }