feat kafka 改版 2

This commit is contained in:
2026-01-30 11:02:55 +08:00
parent 3b14697a45
commit 9781cd126f
7 changed files with 18 additions and 10 deletions

View File

@@ -3,6 +3,7 @@ package repository
import (
"fmt"
"git.hlsq.asia/mmorpg/service-common/db/mysql"
"git.hlsq.asia/mmorpg/service-user/internal/dao/query"
)
var dbName mysql.DBName = "user_db"
@@ -12,6 +13,10 @@ var (
userCacheByPhone = "c:user:p:%v"
)
func Query() *query.Query {
return query.Use(mysql.GetDB(dbName))
}
func keyCacheBySn(sn string, tableName string) string {
return fmt.Sprintf(cacheBySn, tableName, sn)
}