feat kafka 改版 2
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user