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

@@ -2,7 +2,6 @@ package repository
import (
"context"
"git.hlsq.asia/mmorpg/service-common/db/mysql"
"git.hlsq.asia/mmorpg/service-common/db/redis"
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/model"
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
@@ -15,10 +14,10 @@ type RecordDao struct {
cache *redis.CacheClient
}
func NewRecordDao(ctx context.Context, cache ...*redis.CacheClient) *RecordDao {
func NewRecordDao(ctx context.Context, query *query.Query, cache ...*redis.CacheClient) *RecordDao {
dao := &RecordDao{
ctx: ctx,
query: query.Use(mysql.GetDB(dbName)),
query: query,
}
if len(cache) > 0 {
dao.cache = cache[0]