feat kafka 改版 2

This commit is contained in:
2026-01-30 11:02:53 +08:00
parent defe0b8fff
commit 39fa373c01
22 changed files with 1297 additions and 236 deletions

View File

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