浏览代码

update

master
dengbiao 3 天前
父节点
当前提交
fd005650a3
共有 2 个文件被更改,包括 21 次插入2 次删除
  1. +19
    -0
      enum/sys_cfg.go
  2. +2
    -2
      utils/es/base.go

+ 19
- 0
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 "未知"
}
}

+ 2
- 2
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
}

正在加载...
取消
保存