refactor(internal): 优化 OSS 预签名 URL 缓存刷新任务和英雄数据缓存逻辑

- 注释掉 OSS预签名 URL 缓存刷新任务的定时执行代码
- 在 hero/hero.go 中增加对 Redis缓存和英雄数据集的非空校验
- 修改 OSS预签名 URL 生成逻辑,自动替换为 CDN 域名
This commit is contained in:
hu xiaotong
2025-07-25 17:08:39 +08:00
parent ce0fa7f2ed
commit fc41c5ca73
75 changed files with 1970 additions and 1261 deletions

View File

@@ -67,3 +67,22 @@ func TestInitI18nStaticToDB(t *testing.T) {
}
t.Logf("静态i18n数据导入成功共%d条", len(i18n.I18nEnToZh))
}
func TestSyncI18nFromRemote(t *testing.T) {
ctx := context.Background()
logic := i18n.GetI18nLogic()
err := logic.SyncI18nFromRemote(ctx)
if err != nil {
t.Fatalf("远程i18n数据同步失败: %v", err)
}
t.Logf("远程i18n数据同步成功")
}
func TestFixHeroAndArtifactNameToChinese(t *testing.T) {
ctx := context.Background()
err := FixHeroAndArtifactNameToChinese(ctx)
if err != nil {
t.Fatalf("修复英雄/神器中文名失败: %v", err)
}
t.Logf("修复英雄/神器中文名成功")
}