From 5f86a697ec2dead88ae6bf0e2a3e8c03ed6042be Mon Sep 17 00:00:00 2001 From: dengbiao Date: Sat, 28 Dec 2024 12:27:27 +0800 Subject: [PATCH] update --- app/hdl/institutional_management/egg_energy/hdl_egg_point.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/hdl/institutional_management/egg_energy/hdl_egg_point.go b/app/hdl/institutional_management/egg_energy/hdl_egg_point.go index 36f673e..018aa06 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_egg_point.go +++ b/app/hdl/institutional_management/egg_energy/hdl_egg_point.go @@ -10,6 +10,7 @@ import ( "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "code.fnuoos.com/EggPlanet/egg_models.git/src/model" md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/md" + es2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/utils/es" "code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es" "fmt" "github.com/gin-gonic/gin" @@ -251,7 +252,8 @@ func UserEggFlow(c *gin.Context) { var esIndexName string if req.Year == "" && req.Week == "" { - esIndexName, _ = es.GetLatestIndexFromAlias(md2.EggEnergyUserEggScoreEsAlias) + esIndex := es2.GetLatestEffectiveIndexFromAlias(time.Now()) + esIndexName = md2.EggEnergyUserEggScoreEsAlias + "_" + esIndex resp.Year, resp.Week = egg_energy.GetYearsAndWeekStr(esIndexName) } else { esIndexName = md2.EggEnergyUserEggScoreEsAlias + "_" + req.Year + req.Week