Browse Source

update

master
dengbiao 4 days ago
parent
commit
5f86a697ec
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      app/hdl/institutional_management/egg_energy/hdl_egg_point.go

+ 3
- 1
app/hdl/institutional_management/egg_energy/hdl_egg_point.go View File

@@ -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


Loading…
Cancel
Save