diff --git a/enum/sys_cfg.go b/enum/sys_cfg.go index cff91fd..7f16223 100644 --- a/enum/sys_cfg.go +++ b/enum/sys_cfg.go @@ -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 "未知" + } +} diff --git a/utils/es/base.go b/utils/es/base.go index 93c42d9..6f79ca1 100644 --- a/utils/es/base.go +++ b/utils/es/base.go @@ -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 }