refactor: 重构服务层和仓库层

This commit is contained in:
lan
2025-12-03 10:58:39 +08:00
parent 034e02e93a
commit e873c58af9
32 changed files with 1445 additions and 5213 deletions

View File

@@ -296,6 +296,11 @@ func (b *CacheKeyBuilder) Texture(textureID int64) string {
return fmt.Sprintf("%stexture:id:%d", b.prefix, textureID)
}
// TextureByHash 构建材质hash缓存键
func (b *CacheKeyBuilder) TextureByHash(hash string) string {
return fmt.Sprintf("%stexture:hash:%s", b.prefix, hash)
}
// TextureList 构建材质列表缓存键
func (b *CacheKeyBuilder) TextureList(userID int64, page int) string {
return fmt.Sprintf("%stexture:user:%d:page:%d", b.prefix, userID, page)