diff --git a/internal/rpc/msg/send_pull.go b/internal/rpc/msg/send_pull.go index da57150e2..06b3b8c01 100644 --- a/internal/rpc/msg/send_pull.go +++ b/internal/rpc/msg/send_pull.go @@ -287,13 +287,13 @@ func (m *msgServer) GetMaxAndMinSeq(ctx context.Context, req *sdkws.GetMaxAndMin func (m *msgServer) PullMessageBySeqList(ctx context.Context, req *sdkws.PullMessageBySeqListReq) (*sdkws.PullMessageBySeqListResp, error) { resp := &sdkws.PullMessageBySeqListResp{GroupMsgDataList: make(map[string]*sdkws.MsgDataList)} - msgs, err := m.MsgInterface.GetMessageListBySeq(ctx, req.UserID, req.SeqList) + msgs, err := m.MsgInterface.GetMessageListBySeq(ctx, req.UserID, req.Seqs) if err != nil { return nil, err } resp.List = msgs for userID, list := range req.GroupSeqList { - msgs, err := m.MsgInterface.GetMessageListBySeq(ctx, userID, list.SeqList) + msgs, err := m.MsgInterface.GetMessageListBySeq(ctx, userID, req.Seqs) if err != nil { return nil, err } diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index b8ed937e5..df306f3ca 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -149,6 +149,19 @@ type MsgDatabaseInterface interface { SetMessageReactionExpire(ctx context.Context, clientMsgID string, sessionType int32, expiration time.Duration) (bool, error) GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (*pbMsg.ExtendMsg, error) + InsertOrUpdateReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*sdkws.KeyValue) error + GetMessageTypeKeyValue(ctx context.Context, clientMsgID string, sessionType int32, typeKey string) (string, error) + GetOneMessageAllReactionList(ctx context.Context, clientMsgID string, sessionType int32) (map[string]string, error) + DeleteOneMessageKey(ctx context.Context, clientMsgID string, sessionType int32, subKey string) error + DeleteReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*sdkws.KeyValue) error + SetSendMsgStatus(ctx context.Context, userID string, status int32) error + GetSendMsgStatus(ctx context.Context, userID string) (int32, error) + MsgToMQ(ctx context.Context, key string, mq *pbMsg.MsgDataToMQ) error + GetUserMaxSeq(ctx context.Context, userID string) (int64, error) + GetUserMinSeq(ctx context.Context, userID string) (int64, error) + GetGroupMaxSeq(ctx context.Context, groupID string) (int64, error) + GetGroupMinSeq(ctx context.Context, groupID string) (int64, error) + GetMessageListBySeq(ctx context.Context, userID string, seqs []int64) ([]*sdkws.MsgData, error) } type MsgDatabase struct { mgo unRelationTb.MsgDocModelInterface @@ -156,6 +169,91 @@ type MsgDatabase struct { msg unRelationTb.MsgDocModel } +func (db *MsgDatabase) JudgeMessageReactionEXISTS(ctx context.Context, clientMsgID string, sessionType int32) (bool, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) SetMessageTypeKeyValue(ctx context.Context, clientMsgID string, sessionType int32, typeKey, value string) error { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) SetMessageReactionExpire(ctx context.Context, clientMsgID string, sessionType int32, expiration time.Duration) (bool, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (*pbMsg.ExtendMsg, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) InsertOrUpdateReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*sdkws.KeyValue) error { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetMessageTypeKeyValue(ctx context.Context, clientMsgID string, sessionType int32, typeKey string) (string, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetOneMessageAllReactionList(ctx context.Context, clientMsgID string, sessionType int32) (map[string]string, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) DeleteOneMessageKey(ctx context.Context, clientMsgID string, sessionType int32, subKey string) error { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) DeleteReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*sdkws.KeyValue) error { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) SetSendMsgStatus(ctx context.Context, userID string, status int32) error { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetSendMsgStatus(ctx context.Context, userID string) (int32, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) MsgToMQ(ctx context.Context, key string, mq *pbMsg.MsgDataToMQ) error { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetUserMaxSeq(ctx context.Context, userID string) (int64, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetUserMinSeq(ctx context.Context, userID string) (int64, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetGroupMaxSeq(ctx context.Context, groupID string) (int64, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetGroupMinSeq(ctx context.Context, groupID string) (int64, error) { + //TODO implement me + panic("implement me") +} + +func (db *MsgDatabase) GetMessageListBySeq(ctx context.Context, userID string, seqs []int64) ([]*sdkws.MsgData, error) { + //TODO implement me + panic("implement me") +} + func NewMsgDatabase(mgo *mongo.Client, rdb redis.UniversalClient) MsgDatabaseInterface { return &MsgDatabase{} }