mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-16 14:59:01 +08:00
proto modify
This commit is contained in:
@@ -7,21 +7,21 @@ import (
|
||||
|
||||
type ChatLogDatabase interface {
|
||||
CreateChatLog(msg pbMsg.MsgDataToMQ) error
|
||||
GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relationTb.ChatLogModel, error)
|
||||
GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypes []int32) (int64, []relationTb.ChatLogModel, error)
|
||||
}
|
||||
|
||||
func NewChatLogDatabase(chatLogModelInterface relationTb.ChatLogModelInterface) ChatLogDatabase {
|
||||
return &ChatLogDataBase{chatLogModel: chatLogModelInterface}
|
||||
return &chatLogDatabase{chatLogModel: chatLogModelInterface}
|
||||
}
|
||||
|
||||
type ChatLogDataBase struct {
|
||||
type chatLogDatabase struct {
|
||||
chatLogModel relationTb.ChatLogModelInterface
|
||||
}
|
||||
|
||||
func (c *ChatLogDataBase) CreateChatLog(msg pbMsg.MsgDataToMQ) error {
|
||||
func (c *chatLogDatabase) CreateChatLog(msg pbMsg.MsgDataToMQ) error {
|
||||
return c.chatLogModel.Create(msg)
|
||||
}
|
||||
|
||||
func (c *ChatLogDataBase) GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relationTb.ChatLogModel, error) {
|
||||
return c.chatLogModel.GetChatLog(chatLog, pageNumber, showNumber, contentTypeList)
|
||||
func (c *chatLogDatabase) GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypes []int32) (int64, []relationTb.ChatLogModel, error) {
|
||||
return c.chatLogModel.GetChatLog(chatLog, pageNumber, showNumber, contentTypes)
|
||||
}
|
||||
|
||||
@@ -2,11 +2,13 @@ package controller
|
||||
|
||||
import (
|
||||
"OpenIM/pkg/common/db/cache"
|
||||
"OpenIM/pkg/proto/sdkws"
|
||||
"context"
|
||||
)
|
||||
|
||||
type PushDatabase interface {
|
||||
DelFcmToken(ctx context.Context, userID string, platformID int) error
|
||||
HandleSignalInvite(ctx context.Context, msg *sdkws.MsgData, pushToUserID string) (isSend bool, err error)
|
||||
}
|
||||
|
||||
type pushDataBase struct {
|
||||
@@ -20,3 +22,7 @@ func NewPushDatabase(cache cache.Cache) PushDatabase {
|
||||
func (p *pushDataBase) DelFcmToken(ctx context.Context, userID string, platformID int) error {
|
||||
return p.cache.DelFcmToken(ctx, userID, platformID)
|
||||
}
|
||||
|
||||
func (p *pushDataBase) HandleSignalInvite(ctx context.Context, msg *sdkws.MsgData, pushToUserID string) (isSend bool, err error) {
|
||||
return p.cache.HandleSignalInvite(ctx, msg, pushToUserID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user