config path

This commit is contained in:
wangchuxiao
2023-02-24 11:01:33 +08:00
parent dd7a7d9cda
commit bb94a7947c
24 changed files with 245 additions and 801 deletions
+1 -1
View File
@@ -1,11 +1,11 @@
package controller
import (
"OpenIM/internal/tx"
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/cache"
"OpenIM/pkg/common/db/relation"
relationTb "OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/common/db/tx"
"OpenIM/pkg/utils"
"context"
"encoding/json"
+1 -1
View File
@@ -1,9 +1,9 @@
package controller
import (
"OpenIM/internal/tx"
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/common/db/tx"
"OpenIM/pkg/utils"
"context"
"errors"
+1 -1
View File
@@ -1,11 +1,11 @@
package controller
import (
"OpenIM/internal/tx"
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/cache"
relationTb "OpenIM/pkg/common/db/table/relation"
unRelationTb "OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/common/db/tx"
"OpenIM/pkg/utils"
"context"
"fmt"
+7 -1
View File
@@ -50,6 +50,8 @@ type MsgDatabase interface {
GetSuperGroupMinMaxSeqInMongoAndCache(ctx context.Context, groupID string) (minSeqMongo, maxSeqMongo, maxSeqCache int64, err error)
// 设置群用户最小seq 直接调用cache
SetGroupUserMinSeq(ctx context.Context, groupID, userID string, minSeq int64) (err error)
GetGroupUserMinSeq(ctx context.Context, groupID, userID string) (int64, error)
// 设置用户最小seq 直接调用cache
SetUserMinSeq(ctx context.Context, userID string, minSeq int64) (err error)
@@ -79,7 +81,7 @@ func NewMsgDatabase(mgo *mongo.Client, rdb redis.UniversalClient) MsgDatabase {
type msgDatabase struct {
mgo unRelationTb.MsgDocModelInterface
cache cache.MsgCache
cache cache.Cache
msg unRelationTb.MsgDocModel
ExtendMsg unRelationTb.ExtendMsgSetModelInterface
rdb redis.Client
@@ -685,3 +687,7 @@ func (db *msgDatabase) SetGroupUserMinSeq(ctx context.Context, groupID, userID s
func (db *msgDatabase) SetUserMinSeq(ctx context.Context, userID string, minSeq int64) (err error) {
return db.cache.SetUserMinSeq(ctx, userID, minSeq)
}
func (db *msgDatabase) GetGroupUserMinSeq(ctx context.Context, groupID, userID string) (int64, error) {
return db.cache.GetGroupUserMinSeq(ctx, groupID, userID)
}
+1 -1
View File
@@ -10,7 +10,7 @@ type PushInterface interface {
}
type PushDataBase struct {
cache cache.MsgCache
cache cache.Cache
}
func (p *PushDataBase) DelFcmToken(ctx context.Context, userID string, platformID int) error {