proto modify

This commit is contained in:
wangchuxiao
2023-03-02 12:00:31 +08:00
parent fc009c7c6c
commit d991947d4c
21 changed files with 344 additions and 3153 deletions
+6 -6
View File
@@ -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)
}
+6
View File
@@ -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)
}