Browse Source

update

master
dengbiao 1 month ago
parent
commit
fd005650a3
2 changed files with 21 additions and 2 deletions
  1. +19
    -0
      enum/sys_cfg.go
  2. +2
    -2
      utils/es/base.go

+ 19
- 0
enum/sys_cfg.go View File

@@ -73,3 +73,22 @@ func (gt AliyunOss) String() string {
return "未知"
}
}

// AlipayConfig 支付宝支付枚举类型
type AlipayConfig string

const (
AlipayAppId = "alipay_app_id"
AlipayPrivateKey = "alipay_private_key"
)

func (gt AlipayConfig) String() string {
switch gt {
case AlipayAppId:
return ""
case AlipayPrivateKey:
return "oss存储桶名称"
default:
return "未知"
}
}

+ 2
- 2
utils/es/base.go View File

@@ -21,10 +21,10 @@ func GetLatestEffectiveIndexFromAlias(now time.Time) string {
year, week := now.ISOWeek()
if now.Weekday() > time.Wednesday || (now.Weekday() > time.Wednesday && now.Hour() > 14) {
// 当前已经过了周三下午两点 返回当周蛋蛋分
esIndexName = md.EggEnergyUserEggScoreEsAlias + "_" + egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week)
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week)
} else {
// 没过周三下午两点 返回上周蛋蛋分
esIndexName = md.EggEnergyUserEggScoreEsAlias + "_" + egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-1)
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-1)
}
return esIndexName
}

Loading…
Cancel
Save