瀏覽代碼

update

master
dengbiao 1 天之前
父節點
當前提交
a260007246
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      utils/es/base.go

+ 3
- 2
utils/es/base.go 查看文件

@@ -16,15 +16,16 @@ func GetAppointIndexFromAlias(year string, week string) string {
}

// GetLatestEffectiveIndexFromAlias 获取最新有效别名
// TODO::临时默认全是60分
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-1)
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-10)
} else {
// 没过周三下午两点 返回上上周蛋蛋分
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-2)
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-20)
}
return esIndexName
}

Loading…
取消
儲存