上传聊天系统业务开发
This commit is contained in:
parent
0031d7bfe8
commit
cdedf4414d
@ -144,7 +144,7 @@ func (this *UserSession) Polls() []*pb.UserMessage {
|
||||
|
||||
func (this *UserSession) Push() (err error) {
|
||||
reply := &pb.RPCMessageReply{}
|
||||
if _, err = this.service.RpcGo(context.Background(), fmt.Sprintf("%s/%s", Service_Gateway, this.GatewayServiceId), string(Rpc_GatewayAgentSendMsg), &pb.AgentSendMessageReq{
|
||||
if _, err = this.service.AcrossClusterRpcGo(context.Background(), this.ServiceTag, fmt.Sprintf("%s/%s", Service_Gateway, this.GatewayServiceId), string(Rpc_GatewayAgentSendMsg), &pb.AgentSendMessageReq{
|
||||
UserSessionId: this.SessionId,
|
||||
Reply: this.msgqueue,
|
||||
}, reply); err != nil {
|
||||
|
37
modules/chat/api_chanagechannel.go
Normal file
37
modules/chat/api_chanagechannel.go
Normal file
@ -0,0 +1,37 @@
|
||||
package chat
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ChanageChannelCheck(session comm.IUserSession, req *pb.ChatChanageChannelReq) (code pb.ErrorCode) {
|
||||
return
|
||||
}
|
||||
|
||||
///改变跨服聊天频道
|
||||
func (this *apiComp) ChanageChannel(session comm.IUserSession, req *pb.ChatChanageChannelReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
err error
|
||||
ok bool
|
||||
)
|
||||
|
||||
if err, ok = this.module.modelChat.ChanageChannel(session, req.ChannelId); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
if ok {
|
||||
if err = this.module.modelChat.RemoveCrossChannelMember(session); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
this.module.modelChat.ChanageUserExpand(session.GetUserId(), map[string]interface{}{
|
||||
"Chatchannel": req.ChannelId,
|
||||
})
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "chanagechannel", &pb.ChatChanageChannelResp{ChannelId: req.ChannelId, IsSucc: ok})
|
||||
return
|
||||
}
|
@ -13,7 +13,7 @@ func (this *apiComp) CrossChannelCheck(session comm.IUserSession, req *pb.ChatCr
|
||||
return
|
||||
}
|
||||
|
||||
///获取未读消息
|
||||
///请求跨服聊天频道
|
||||
func (this *apiComp) CrossChannel(session comm.IUserSession, req *pb.ChatCrossChannelReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
channel int32
|
||||
@ -24,7 +24,7 @@ func (this *apiComp) CrossChannel(session comm.IUserSession, req *pb.ChatCrossCh
|
||||
return
|
||||
}
|
||||
this.module.modelChat.ChanageUserExpand(session.GetUserId(), map[string]interface{}{
|
||||
"ChatChannel": channel,
|
||||
"catchannel": channel,
|
||||
})
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ChatCrossChannelResp{ChannelId: channel})
|
||||
return
|
||||
|
@ -13,16 +13,32 @@ func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.ChatGetList
|
||||
return
|
||||
}
|
||||
|
||||
///获取未读消息
|
||||
///获取本服聊天消息记录
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.ChatGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
err error
|
||||
list []*pb.DBChat
|
||||
)
|
||||
switch req.Channel {
|
||||
case pb.ChatChannel_World:
|
||||
if list, err = this.module.modelChat.GetChatQueue(req.Channel, 0, 0, 0); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
break
|
||||
case pb.ChatChannel_Union:
|
||||
if list, err = this.module.modelChat.GetChatQueue(req.Channel, 0, 0, 0); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
break
|
||||
case pb.ChatChannel_Private:
|
||||
if list, err = this.module.modelChat.QueryUserMsg(session.GetUserId()); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
break
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ChatGetListResp{Chats: list})
|
||||
return
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package chat
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"time"
|
||||
@ -26,26 +27,31 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (code
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Channel: req.Channel,
|
||||
Suid: session.GetUserId(),
|
||||
Ruid: req.TargetId,
|
||||
Headid: user.Avatar,
|
||||
Content: req.Content,
|
||||
Ctime: time.Now().Unix(),
|
||||
}
|
||||
if err = this.module.modelChat.AddChatMsg(msg); err != nil {
|
||||
switch msg.Channel {
|
||||
case pb.ChatChannel_World:
|
||||
if err = this.module.modelChat.addChatMsg(worldchatkey, this.module.configure.GetChannelRecordMax(), msg); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "send", &pb.ChatSendResp{})
|
||||
switch msg.Channel {
|
||||
case pb.ChatChannel_World:
|
||||
this.module.PushWorld(msg)
|
||||
break
|
||||
case pb.ChatChannel_Union:
|
||||
msg.UnionId = req.TargetId
|
||||
if err = this.module.modelChat.addChatMsg(fmt.Sprintf("%s:%s", unionchatkey, req.TargetId), this.module.configure.GetChannelRecordMax(), msg); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
this.module.PushUnion(msg)
|
||||
break
|
||||
case pb.ChatChannel_Private:
|
||||
msg.Ruid = req.TargetId
|
||||
this.module.PushUser(msg)
|
||||
break
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "send", &pb.ChatSendResp{})
|
||||
return
|
||||
}
|
||||
|
48
modules/chat/api_spangetlist.go
Normal file
48
modules/chat/api_spangetlist.go
Normal file
@ -0,0 +1,48 @@
|
||||
package chat
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) SpanGetListCheck(session comm.IUserSession, req *pb.ChatSpanGetListReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///获取跨服聊天消息记录
|
||||
func (this *apiComp) SpanGetList(session comm.IUserSession, req *pb.ChatSpanGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
err error
|
||||
result *pb.DBUserExpand
|
||||
list []*pb.DBChat
|
||||
)
|
||||
if result, err = this.module.modelChat.GetUserExpand(session.GetUserId()); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
if req.ChannelId != result.Chatchannel {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
group := this.module.configure.GetServiecTagGroup(session.GetServiecTag())
|
||||
switch req.Channel {
|
||||
case pb.ChatChannel_CrossServer:
|
||||
if list, err = this.module.modelChat.GetChatQueue(req.Channel, 0, group, req.ChannelId); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
break
|
||||
case pb.ChatChannel_System:
|
||||
if list, err = this.module.modelChat.GetChatQueue(req.Channel, 0, 0, 0); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
break
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ChatSpanGetListResp{Chats: list})
|
||||
return
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package chat
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"time"
|
||||
@ -31,20 +32,21 @@ func (this *apiComp) SpanSend(session comm.IUserSession, req *pb.ChatSpanSendReq
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Channel: req.Channel,
|
||||
Suid: session.GetUserId(),
|
||||
AreaId: userexpand.ChatChannel,
|
||||
AreaId: userexpand.Chatchannel,
|
||||
Headid: user.Avatar,
|
||||
Content: req.Content,
|
||||
Ctime: time.Now().Unix(),
|
||||
}
|
||||
if err = this.module.modelChat.AddChatMsg(msg); err != nil {
|
||||
group := this.module.configure.GetServiecTagGroup(session.GetServiecTag())
|
||||
switch msg.Channel {
|
||||
case pb.ChatChannel_CrossServer:
|
||||
if err = this.module.modelChat.addChatMsg(fmt.Sprintf("%s:%d--%d", crosschatkey, group, userexpand.Chatchannel), this.module.configure.GetChannelRecordMax(), msg); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "send", &pb.ChatSendResp{})
|
||||
switch msg.Channel {
|
||||
case pb.ChatChannel_CrossServer:
|
||||
this.module.PushToUsers(userexpand.ChatChannel, msg)
|
||||
this.module.PushToUsers(group, userexpand.Chatchannel, msg)
|
||||
break
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "send", &pb.ChatSendResp{})
|
||||
return
|
||||
}
|
||||
|
@ -21,3 +21,23 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
//获取服务区 分组
|
||||
func (this *configureComp) GetServiecTagGroup(stag string) int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
//获取自动加入频道 任务限制
|
||||
func (this *configureComp) GetAutoIntoChannelMax() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
//获取手动加入频道 任务限制
|
||||
func (this *configureComp) GetChanageChannelMax() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
//获取手动加入频道 任务限制
|
||||
func (this *configureComp) GetChannelRecordMax() int {
|
||||
return 99
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/codec"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
@ -61,6 +62,65 @@ func (this *modelChatComp) QueryUserMsg(uid string) (result []*pb.DBChat, err er
|
||||
return
|
||||
}
|
||||
|
||||
//查询用户未读消息
|
||||
func (this *modelChatComp) GetChatQueue(channel pb.ChatChannel, union, group, area int32) (result []*pb.DBChat, err error) {
|
||||
var (
|
||||
key string
|
||||
cdata []map[string]string
|
||||
find bson.M
|
||||
c *mongo.Cursor
|
||||
n int
|
||||
)
|
||||
switch channel {
|
||||
case pb.ChatChannel_World:
|
||||
key = worldchatkey
|
||||
find = bson.M{"channel": channel}
|
||||
break
|
||||
case pb.ChatChannel_Union:
|
||||
key = unionchatkey
|
||||
find = bson.M{"channel": channel, "unionId": union}
|
||||
break
|
||||
case pb.ChatChannel_CrossServer:
|
||||
key = fmt.Sprintf("%s:%d--%d", crosschatkey, group, area)
|
||||
find = bson.M{"channel": channel, "group": group, "areaId": area}
|
||||
break
|
||||
case pb.ChatChannel_System:
|
||||
key = systemchatkey
|
||||
find = bson.M{"channel": channel}
|
||||
break
|
||||
}
|
||||
if cdata, err = this.Batchgetqueues(key); err == nil {
|
||||
result = make([]*pb.DBChat, len(cdata))
|
||||
for i, v := range cdata {
|
||||
chat := &pb.DBChat{}
|
||||
if err = codec.UnmarshalMapJson(v, chat); err != nil {
|
||||
return
|
||||
}
|
||||
result[i] = chat
|
||||
}
|
||||
}
|
||||
if err == redis.RedisNil {
|
||||
//query from mgo
|
||||
if c, err = this.DB.Find(core.SqlTable(this.TableName), find); err != nil {
|
||||
return
|
||||
} else {
|
||||
result = make([]*pb.DBChat, c.RemainingBatchLength())
|
||||
for c.Next(context.Background()) {
|
||||
chat := &pb.DBChat{}
|
||||
if err = c.Decode(chat); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
}
|
||||
result[n] = chat
|
||||
n++
|
||||
}
|
||||
if len(result) > 0 {
|
||||
this.addChatMsg(key, this.module.configure.GetChannelRecordMax(), result...)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//添加跨服频道成员
|
||||
func (this *modelChatComp) AddCrossChannelMember(session comm.IUserSession) (channel int32, err error) {
|
||||
udata := &pb.CacheUser{
|
||||
@ -72,13 +132,15 @@ func (this *modelChatComp) AddCrossChannelMember(session comm.IUserSession) (cha
|
||||
}
|
||||
channel = 0
|
||||
count := 0
|
||||
group := this.module.configure.GetServiecTagGroup(session.GetServiecTag())
|
||||
maxnum := this.module.configure.GetAutoIntoChannelMax()
|
||||
for {
|
||||
key := fmt.Sprintf("%s:%d-member", crosschatkey, channel)
|
||||
key := fmt.Sprintf("%s:%d--%d-member", crosschatkey, group, channel)
|
||||
if count, err = this.Redis.Hlen(key); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
if count < 3000 {
|
||||
if count < maxnum {
|
||||
if err = this.Redis.HMSet(key, map[string]interface{}{session.GetUserId(): udata}); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
@ -91,9 +153,35 @@ func (this *modelChatComp) AddCrossChannelMember(session comm.IUserSession) (cha
|
||||
return
|
||||
}
|
||||
|
||||
func (this *modelChatComp) ChanageChannel(session comm.IUserSession, channel int32) (err error, ok bool) {
|
||||
udata := &pb.CacheUser{
|
||||
Uid: session.GetUserId(),
|
||||
SessionId: session.GetSessionId(),
|
||||
ServiceTag: session.GetServiecTag(),
|
||||
GatewayServiceId: session.GetGatewayServiceId(),
|
||||
Ip: session.GetIP(),
|
||||
}
|
||||
group := this.module.configure.GetServiecTagGroup(session.GetServiecTag())
|
||||
key := fmt.Sprintf("%s:%d--%d-member", crosschatkey, group, channel)
|
||||
count := 0
|
||||
maxnum := this.module.configure.GetChanageChannelMax()
|
||||
if count, err = this.Redis.Hlen(key); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
if count < maxnum {
|
||||
if err = this.Redis.HMSet(key, map[string]interface{}{session.GetUserId(): udata}); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
ok = true
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//读取跨服聊天频道下成员
|
||||
func (this *modelChatComp) GetCrossChannelMember(channel int32) (result []*pb.CacheUser, err error) {
|
||||
key := fmt.Sprintf("%s:%d-member", crosschatkey, channel)
|
||||
func (this *modelChatComp) GetCrossChannelMember(group, channel int32) (result []*pb.CacheUser, err error) {
|
||||
key := fmt.Sprintf("%s:%d--%d-member", crosschatkey, group, channel)
|
||||
result = make([]*pb.CacheUser, 0)
|
||||
if err = this.Redis.HGetAll(key, &result); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
@ -103,41 +191,23 @@ func (this *modelChatComp) GetCrossChannelMember(channel int32) (result []*pb.Ca
|
||||
}
|
||||
|
||||
//移除频道成员
|
||||
func (this *modelChatComp) RemoveCrossChannelMember(uid string) (err error) {
|
||||
func (this *modelChatComp) RemoveCrossChannelMember(session comm.IUserSession) (err error) {
|
||||
var (
|
||||
result *pb.DBUserExpand
|
||||
)
|
||||
if result, err = this.GetUserExpand(uid); err != nil {
|
||||
if result, err = this.GetUserExpand(session.GetUserId()); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
key := fmt.Sprintf("%s:%d-member", crosschatkey, result.ChatChannel)
|
||||
if err = this.Redis.HDel(key, uid); err != nil {
|
||||
group := this.module.configure.GetServiecTagGroup(session.GetServiecTag())
|
||||
key := fmt.Sprintf("%s:%d--%d-member", crosschatkey, group, result.Chatchannel)
|
||||
if err = this.Redis.HDel(key, session.GetUserId()); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//添加聊天消息到数据库中
|
||||
func (this *modelChatComp) AddChatMsg(msg *pb.DBChat) (err error) {
|
||||
switch msg.Channel {
|
||||
case pb.ChatChannel_World:
|
||||
this.addChatMsg(worldchatkey, 99, msg)
|
||||
break
|
||||
case pb.ChatChannel_Union:
|
||||
this.addChatMsg(unionchatkey, 99, msg)
|
||||
break
|
||||
case pb.ChatChannel_CrossServer:
|
||||
this.addChatMsg(fmt.Sprintf("%s:%d", crosschatkey, msg.AreaId), 99, msg)
|
||||
break
|
||||
case pb.ChatChannel_System:
|
||||
// this.addChatMsg(systemchatkey, 99, msg)
|
||||
break
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *modelChatComp) SaveUserMsg(msg *pb.DBChat) (err error) {
|
||||
if _, err = this.DB.InsertOne(core.SqlTable(this.TableName), msg); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
@ -146,22 +216,40 @@ func (this *modelChatComp) SaveUserMsg(msg *pb.DBChat) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *modelChatComp) addChatMsg(key string, count int, msg *pb.DBChat) (err error) {
|
||||
func (this *modelChatComp) addChatMsg(key string, count int, msgs ...*pb.DBChat) (err error) {
|
||||
var (
|
||||
tempdata map[string]string
|
||||
outkey []string
|
||||
ks []string
|
||||
vs []map[string]string
|
||||
values []interface{}
|
||||
)
|
||||
if tempdata, err = codec.MarshalMapJson(msg); err != nil {
|
||||
ks = make([]string, len(msgs))
|
||||
vs = make([]map[string]string, len(msgs))
|
||||
values = make([]interface{}, len(msgs))
|
||||
for i, v := range msgs {
|
||||
if tempdata, err = codec.MarshalMapJson(v); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
if outkey, err = this.Batchsetqueues(key, count, []string{fmt.Sprintf("%s-%s", key, msg.Id)}, []map[string]string{tempdata}); err != nil {
|
||||
ks[i] = fmt.Sprintf("%s-%s", key, v.Id)
|
||||
vs[i] = tempdata
|
||||
values[i] = v
|
||||
}
|
||||
if outkey, err = this.Batchsetqueues(key, count, ks, vs); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
if err = this.DeleteModelLogs(this.TableName, msg.Ruid, bson.M{"_id": bson.M{"$in": outkey}}); err != nil {
|
||||
if _, err = this.DB.InsertMany(core.SqlTable(this.TableName), values); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
if len(outkey) > 0 {
|
||||
if err = this.DeleteModelLogs(this.TableName, "", bson.M{"_id": bson.M{"$in": outkey}}); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -57,9 +57,9 @@ func (this *Chat) OnInstallComp() {
|
||||
}
|
||||
|
||||
//Event------------------------------------------------------------------------------------------------------------
|
||||
func (this *Chat) EventUserOffline(uid string) {
|
||||
err := this.modelChat.RemoveCrossChannelMember(uid)
|
||||
this.Debugf("EventUserOffline:%s err:%v", uid, err)
|
||||
func (this *Chat) EventUserOffline(session comm.IUserSession) {
|
||||
err := this.modelChat.RemoveCrossChannelMember(session)
|
||||
this.Debugf("EventUserOffline:%s err:%v", session.GetUserId(), err)
|
||||
}
|
||||
|
||||
//Push--------------------------------------------------------------------------------------------------------------
|
||||
@ -99,12 +99,12 @@ func (this *Chat) PushUser(msg *pb.DBChat) {
|
||||
}
|
||||
|
||||
//全集群推送
|
||||
func (this *Chat) PushToUsers(channel int32, msg *pb.DBChat) {
|
||||
func (this *Chat) PushToUsers(group, channel int32, msg *pb.DBChat) {
|
||||
var (
|
||||
err error
|
||||
users []*pb.CacheUser
|
||||
)
|
||||
if users, err = this.modelChat.GetCrossChannelMember(channel); err == nil {
|
||||
if users, err = this.modelChat.GetCrossChannelMember(group, channel); err == nil {
|
||||
if err = this.SendMsgToUsers(string(this.GetType()), "push", msg, users...); err != nil {
|
||||
this.Errorf("err:%v", err)
|
||||
return
|
||||
|
@ -146,7 +146,7 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.Game_equipDat
|
||||
Lv: 1,
|
||||
UId: uid,
|
||||
OverlayNum: num,
|
||||
IsInitialState: true,
|
||||
IsInitialState: false,
|
||||
AdverbEntry: make([]*pb.EquipmentAttributeEntry, 0),
|
||||
}
|
||||
if mattr, err = this.module.configure.GetEquipmentAttrlibraryConfigureById(conf.Leadlibrary); err != nil || len(mattr) == 0 {
|
||||
|
@ -84,12 +84,13 @@ type DBChat struct {
|
||||
Channel ChatChannel `protobuf:"varint,2,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道
|
||||
Suid string `protobuf:"bytes,3,opt,name=suid,proto3" json:"suid"` //发送用户id
|
||||
Ruid string `protobuf:"bytes,4,opt,name=ruid,proto3" json:"ruid"` //接收用户id channel == Private 有效
|
||||
AreaId int32 `protobuf:"varint,5,opt,name=areaId,proto3" json:"areaId"` //跨服频道Id
|
||||
UnionId string `protobuf:"bytes,6,opt,name=unionId,proto3" json:"unionId"` //工会id
|
||||
Headid int32 `protobuf:"varint,7,opt,name=headid,proto3" json:"headid"` //用户头像
|
||||
Uname string `protobuf:"bytes,8,opt,name=uname,proto3" json:"uname"` //用户名
|
||||
Content string `protobuf:"bytes,9,opt,name=content,proto3" json:"content"` //内容
|
||||
Ctime int64 `protobuf:"varint,10,opt,name=ctime,proto3" json:"ctime"` //创建时间
|
||||
Groud int32 `protobuf:"varint,5,opt,name=groud,proto3" json:"groud"` //跨服频道 分组id
|
||||
AreaId int32 `protobuf:"varint,6,opt,name=areaId,proto3" json:"areaId"` //跨服频道 频道Id
|
||||
UnionId string `protobuf:"bytes,7,opt,name=unionId,proto3" json:"unionId"` //工会id
|
||||
Headid int32 `protobuf:"varint,8,opt,name=headid,proto3" json:"headid"` //用户头像
|
||||
Uname string `protobuf:"bytes,9,opt,name=uname,proto3" json:"uname"` //用户名
|
||||
Content string `protobuf:"bytes,10,opt,name=content,proto3" json:"content"` //内容
|
||||
Ctime int64 `protobuf:"varint,11,opt,name=ctime,proto3" json:"ctime"` //创建时间
|
||||
}
|
||||
|
||||
func (x *DBChat) Reset() {
|
||||
@ -152,6 +153,13 @@ func (x *DBChat) GetRuid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBChat) GetGroud() int32 {
|
||||
if x != nil {
|
||||
return x.Groud
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBChat) GetAreaId() int32 {
|
||||
if x != nil {
|
||||
return x.AreaId
|
||||
@ -198,28 +206,30 @@ var File_chat_chat_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_chat_chat_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x43, 0x68, 0x61, 0x74, 0x12,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x02, 0x0a, 0x06, 0x44, 0x42, 0x43, 0x68, 0x61, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
|
||||
0x26, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x0c, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x69, 0x64, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72,
|
||||
0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x75, 0x69, 0x64, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x61, 0x72, 0x65, 0x61, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x61, 0x72, 0x65, 0x61, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x2a,
|
||||
0x4d, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x09,
|
||||
0x0a, 0x05, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69,
|
||||
0x6f, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10,
|
||||
0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||
0x67, 0x72, 0x6f, 0x75, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x72, 0x65, 0x61, 0x49, 0x64, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x72, 0x65, 0x61, 0x49, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x69,
|
||||
0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x69, 0x64, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
|
||||
0x63, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x4d, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x10, 0x00, 0x12,
|
||||
0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x72,
|
||||
0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72, 0x6f, 0x73, 0x73,
|
||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -26,7 +26,7 @@ type ChatMessagePush struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Chats []*DBChat `protobuf:"bytes,1,rep,name=Chats,proto3" json:"Chats"`
|
||||
Chats []*DBChat `protobuf:"bytes,1,rep,name=chats,proto3" json:"chats"`
|
||||
}
|
||||
|
||||
func (x *ChatMessagePush) Reset() {
|
||||
@ -113,7 +113,7 @@ type ChatCrossChannelResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ChannelId int32 `protobuf:"varint,1,opt,name=ChannelId,proto3" json:"ChannelId"`
|
||||
ChannelId int32 `protobuf:"varint,1,opt,name=channelId,proto3" json:"channelId"`
|
||||
}
|
||||
|
||||
func (x *ChatCrossChannelResp) Reset() {
|
||||
@ -155,17 +155,123 @@ func (x *ChatCrossChannelResp) GetChannelId() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
//请求未读消息
|
||||
//申请切换频道
|
||||
type ChatChanageChannelReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ChannelId int32 `protobuf:"varint,1,opt,name=channelId,proto3" json:"channelId"`
|
||||
}
|
||||
|
||||
func (x *ChatChanageChannelReq) Reset() {
|
||||
*x = ChatChanageChannelReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ChatChanageChannelReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChatChanageChannelReq) ProtoMessage() {}
|
||||
|
||||
func (x *ChatChanageChannelReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChatChanageChannelReq.ProtoReflect.Descriptor instead.
|
||||
func (*ChatChanageChannelReq) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ChatChanageChannelReq) GetChannelId() int32 {
|
||||
if x != nil {
|
||||
return x.ChannelId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//申请切换频道 回应
|
||||
type ChatChanageChannelResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ChannelId int32 `protobuf:"varint,1,opt,name=channelId,proto3" json:"channelId"`
|
||||
IsSucc bool `protobuf:"varint,2,opt,name=isSucc,proto3" json:"isSucc"`
|
||||
}
|
||||
|
||||
func (x *ChatChanageChannelResp) Reset() {
|
||||
*x = ChatChanageChannelResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ChatChanageChannelResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChatChanageChannelResp) ProtoMessage() {}
|
||||
|
||||
func (x *ChatChanageChannelResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChatChanageChannelResp.ProtoReflect.Descriptor instead.
|
||||
func (*ChatChanageChannelResp) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ChatChanageChannelResp) GetChannelId() int32 {
|
||||
if x != nil {
|
||||
return x.ChannelId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ChatChanageChannelResp) GetIsSucc() bool {
|
||||
if x != nil {
|
||||
return x.IsSucc
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
//请求聊天消息
|
||||
type ChatGetListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Channel ChatChannel `protobuf:"varint,1,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道
|
||||
}
|
||||
|
||||
func (x *ChatGetListReq) Reset() {
|
||||
*x = ChatGetListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[3]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -178,7 +284,7 @@ func (x *ChatGetListReq) String() string {
|
||||
func (*ChatGetListReq) ProtoMessage() {}
|
||||
|
||||
func (x *ChatGetListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[3]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -191,21 +297,29 @@ func (x *ChatGetListReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ChatGetListReq.ProtoReflect.Descriptor instead.
|
||||
func (*ChatGetListReq) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{3}
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ChatGetListReq) GetChannel() ChatChannel {
|
||||
if x != nil {
|
||||
return x.Channel
|
||||
}
|
||||
return ChatChannel_World
|
||||
}
|
||||
|
||||
//请求聊天消息 回应
|
||||
type ChatGetListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Chats []*DBChat `protobuf:"bytes,1,rep,name=Chats,proto3" json:"Chats"`
|
||||
Chats []*DBChat `protobuf:"bytes,1,rep,name=chats,proto3" json:"chats"`
|
||||
}
|
||||
|
||||
func (x *ChatGetListResp) Reset() {
|
||||
*x = ChatGetListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[4]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -218,7 +332,7 @@ func (x *ChatGetListResp) String() string {
|
||||
func (*ChatGetListResp) ProtoMessage() {}
|
||||
|
||||
func (x *ChatGetListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[4]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -231,7 +345,7 @@ func (x *ChatGetListResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ChatGetListResp.ProtoReflect.Descriptor instead.
|
||||
func (*ChatGetListResp) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{4}
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ChatGetListResp) GetChats() []*DBChat {
|
||||
@ -241,6 +355,110 @@ func (x *ChatGetListResp) GetChats() []*DBChat {
|
||||
return nil
|
||||
}
|
||||
|
||||
//请求跨服聊天消息
|
||||
type ChatSpanGetListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Channel ChatChannel `protobuf:"varint,1,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道
|
||||
ChannelId int32 `protobuf:"varint,2,opt,name=channelId,proto3" json:"channelId"` //跨服频道id
|
||||
}
|
||||
|
||||
func (x *ChatSpanGetListReq) Reset() {
|
||||
*x = ChatSpanGetListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ChatSpanGetListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChatSpanGetListReq) ProtoMessage() {}
|
||||
|
||||
func (x *ChatSpanGetListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChatSpanGetListReq.ProtoReflect.Descriptor instead.
|
||||
func (*ChatSpanGetListReq) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *ChatSpanGetListReq) GetChannel() ChatChannel {
|
||||
if x != nil {
|
||||
return x.Channel
|
||||
}
|
||||
return ChatChannel_World
|
||||
}
|
||||
|
||||
func (x *ChatSpanGetListReq) GetChannelId() int32 {
|
||||
if x != nil {
|
||||
return x.ChannelId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//请求跨服聊天消息 回应
|
||||
type ChatSpanGetListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Chats []*DBChat `protobuf:"bytes,1,rep,name=chats,proto3" json:"chats"`
|
||||
}
|
||||
|
||||
func (x *ChatSpanGetListResp) Reset() {
|
||||
*x = ChatSpanGetListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ChatSpanGetListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChatSpanGetListResp) ProtoMessage() {}
|
||||
|
||||
func (x *ChatSpanGetListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChatSpanGetListResp.ProtoReflect.Descriptor instead.
|
||||
func (*ChatSpanGetListResp) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *ChatSpanGetListResp) GetChats() []*DBChat {
|
||||
if x != nil {
|
||||
return x.Chats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//消息发送请求
|
||||
type ChatSendReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -255,7 +473,7 @@ type ChatSendReq struct {
|
||||
func (x *ChatSendReq) Reset() {
|
||||
*x = ChatSendReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[5]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -268,7 +486,7 @@ func (x *ChatSendReq) String() string {
|
||||
func (*ChatSendReq) ProtoMessage() {}
|
||||
|
||||
func (x *ChatSendReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[5]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -281,7 +499,7 @@ func (x *ChatSendReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ChatSendReq.ProtoReflect.Descriptor instead.
|
||||
func (*ChatSendReq) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{5}
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *ChatSendReq) GetChannel() ChatChannel {
|
||||
@ -315,7 +533,7 @@ type ChatSendResp struct {
|
||||
func (x *ChatSendResp) Reset() {
|
||||
*x = ChatSendResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[6]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -328,7 +546,7 @@ func (x *ChatSendResp) String() string {
|
||||
func (*ChatSendResp) ProtoMessage() {}
|
||||
|
||||
func (x *ChatSendResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[6]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -341,7 +559,7 @@ func (x *ChatSendResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ChatSendResp.ProtoReflect.Descriptor instead.
|
||||
func (*ChatSendResp) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{6}
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
//跨服消息发送请求
|
||||
@ -357,7 +575,7 @@ type ChatSpanSendReq struct {
|
||||
func (x *ChatSpanSendReq) Reset() {
|
||||
*x = ChatSpanSendReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[7]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -370,7 +588,7 @@ func (x *ChatSpanSendReq) String() string {
|
||||
func (*ChatSpanSendReq) ProtoMessage() {}
|
||||
|
||||
func (x *ChatSpanSendReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[7]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -383,7 +601,7 @@ func (x *ChatSpanSendReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ChatSpanSendReq.ProtoReflect.Descriptor instead.
|
||||
func (*ChatSpanSendReq) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{7}
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *ChatSpanSendReq) GetChannel() ChatChannel {
|
||||
@ -410,7 +628,7 @@ type ChatSpanSendResp struct {
|
||||
func (x *ChatSpanSendResp) Reset() {
|
||||
*x = ChatSpanSendResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[8]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -423,7 +641,7 @@ func (x *ChatSpanSendResp) String() string {
|
||||
func (*ChatSpanSendResp) ProtoMessage() {}
|
||||
|
||||
func (x *ChatSpanSendResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[8]
|
||||
mi := &file_chat_chat_msg_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -436,7 +654,7 @@ func (x *ChatSpanSendResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ChatSpanSendResp.ProtoReflect.Descriptor instead.
|
||||
func (*ChatSpanSendResp) Descriptor() ([]byte, []int) {
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{8}
|
||||
return file_chat_chat_msg_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
var File_chat_chat_msg_proto protoreflect.FileDescriptor
|
||||
@ -446,33 +664,53 @@ var file_chat_chat_msg_proto_rawDesc = []byte{
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x74,
|
||||
0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x30, 0x0a, 0x0f, 0x43, 0x68, 0x61,
|
||||
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x05,
|
||||
0x43, 0x68, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42,
|
||||
0x43, 0x68, 0x61, 0x74, 0x52, 0x05, 0x43, 0x68, 0x61, 0x74, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x43,
|
||||
0x63, 0x68, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42,
|
||||
0x43, 0x68, 0x61, 0x74, 0x52, 0x05, 0x63, 0x68, 0x61, 0x74, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x43,
|
||||
0x68, 0x61, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52,
|
||||
0x65, 0x71, 0x22, 0x34, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x74,
|
||||
0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x30, 0x0a, 0x0f, 0x43, 0x68,
|
||||
0x61, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a,
|
||||
0x05, 0x43, 0x68, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44,
|
||||
0x42, 0x43, 0x68, 0x61, 0x74, 0x52, 0x05, 0x43, 0x68, 0x61, 0x74, 0x73, 0x22, 0x6b, 0x0a, 0x0b,
|
||||
0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x07, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x43,
|
||||
0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x6e, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x68, 0x61,
|
||||
0x74, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x53, 0x0a, 0x0f, 0x43, 0x68, 0x61,
|
||||
0x74, 0x53, 0x70, 0x61, 0x6e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x07,
|
||||
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x74,
|
||||
0x43, 0x68, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65,
|
||||
0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22,
|
||||
0x4e, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63,
|
||||
0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x22,
|
||||
0x38, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x71, 0x12, 0x26, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
|
||||
0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x30, 0x0a, 0x0f, 0x43, 0x68, 0x61,
|
||||
0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x05,
|
||||
0x63, 0x68, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42,
|
||||
0x43, 0x68, 0x61, 0x74, 0x52, 0x05, 0x63, 0x68, 0x61, 0x74, 0x73, 0x22, 0x5a, 0x0a, 0x12, 0x43,
|
||||
0x68, 0x61, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x71, 0x12, 0x26, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
|
||||
0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x74, 0x53,
|
||||
0x70, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d,
|
||||
0x0a, 0x05, 0x63, 0x68, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e,
|
||||
0x44, 0x42, 0x43, 0x68, 0x61, 0x74, 0x52, 0x05, 0x63, 0x68, 0x61, 0x74, 0x73, 0x22, 0x6b, 0x0a,
|
||||
0x0b, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x07,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e,
|
||||
0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x12,
|
||||
0x0a, 0x10, 0x43, 0x68, 0x61, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65,
|
||||
0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x68,
|
||||
0x61, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x53, 0x0a, 0x0f, 0x43, 0x68,
|
||||
0x61, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a,
|
||||
0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c,
|
||||
0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22,
|
||||
0x12, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x53, 0x65, 0x6e, 0x64, 0x52,
|
||||
0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -487,30 +725,37 @@ func file_chat_chat_msg_proto_rawDescGZIP() []byte {
|
||||
return file_chat_chat_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_chat_chat_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_chat_chat_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_chat_chat_msg_proto_goTypes = []interface{}{
|
||||
(*ChatMessagePush)(nil), // 0: ChatMessagePush
|
||||
(*ChatCrossChannelReq)(nil), // 1: ChatCrossChannelReq
|
||||
(*ChatCrossChannelResp)(nil), // 2: ChatCrossChannelResp
|
||||
(*ChatGetListReq)(nil), // 3: ChatGetListReq
|
||||
(*ChatGetListResp)(nil), // 4: ChatGetListResp
|
||||
(*ChatSendReq)(nil), // 5: ChatSendReq
|
||||
(*ChatSendResp)(nil), // 6: ChatSendResp
|
||||
(*ChatSpanSendReq)(nil), // 7: ChatSpanSendReq
|
||||
(*ChatSpanSendResp)(nil), // 8: ChatSpanSendResp
|
||||
(*DBChat)(nil), // 9: DBChat
|
||||
(ChatChannel)(0), // 10: ChatChannel
|
||||
(*ChatChanageChannelReq)(nil), // 3: ChatChanageChannelReq
|
||||
(*ChatChanageChannelResp)(nil), // 4: ChatChanageChannelResp
|
||||
(*ChatGetListReq)(nil), // 5: ChatGetListReq
|
||||
(*ChatGetListResp)(nil), // 6: ChatGetListResp
|
||||
(*ChatSpanGetListReq)(nil), // 7: ChatSpanGetListReq
|
||||
(*ChatSpanGetListResp)(nil), // 8: ChatSpanGetListResp
|
||||
(*ChatSendReq)(nil), // 9: ChatSendReq
|
||||
(*ChatSendResp)(nil), // 10: ChatSendResp
|
||||
(*ChatSpanSendReq)(nil), // 11: ChatSpanSendReq
|
||||
(*ChatSpanSendResp)(nil), // 12: ChatSpanSendResp
|
||||
(*DBChat)(nil), // 13: DBChat
|
||||
(ChatChannel)(0), // 14: ChatChannel
|
||||
}
|
||||
var file_chat_chat_msg_proto_depIdxs = []int32{
|
||||
9, // 0: ChatMessagePush.Chats:type_name -> DBChat
|
||||
9, // 1: ChatGetListResp.Chats:type_name -> DBChat
|
||||
10, // 2: ChatSendReq.channel:type_name -> ChatChannel
|
||||
10, // 3: ChatSpanSendReq.channel:type_name -> ChatChannel
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
13, // 0: ChatMessagePush.chats:type_name -> DBChat
|
||||
14, // 1: ChatGetListReq.channel:type_name -> ChatChannel
|
||||
13, // 2: ChatGetListResp.chats:type_name -> DBChat
|
||||
14, // 3: ChatSpanGetListReq.channel:type_name -> ChatChannel
|
||||
13, // 4: ChatSpanGetListResp.chats:type_name -> DBChat
|
||||
14, // 5: ChatSendReq.channel:type_name -> ChatChannel
|
||||
14, // 6: ChatSpanSendReq.channel:type_name -> ChatChannel
|
||||
7, // [7:7] is the sub-list for method output_type
|
||||
7, // [7:7] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_chat_chat_msg_proto_init() }
|
||||
@ -557,7 +802,7 @@ func file_chat_chat_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatGetListReq); i {
|
||||
switch v := v.(*ChatChanageChannelReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -569,7 +814,7 @@ func file_chat_chat_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatGetListResp); i {
|
||||
switch v := v.(*ChatChanageChannelResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -581,7 +826,7 @@ func file_chat_chat_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatSendReq); i {
|
||||
switch v := v.(*ChatGetListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -593,7 +838,7 @@ func file_chat_chat_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatSendResp); i {
|
||||
switch v := v.(*ChatGetListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -605,7 +850,7 @@ func file_chat_chat_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatSpanSendReq); i {
|
||||
switch v := v.(*ChatSpanGetListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -617,6 +862,54 @@ func file_chat_chat_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatSpanGetListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatSendReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatSendResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatSpanSendReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_chat_chat_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatSpanSendResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -635,7 +928,7 @@ func file_chat_chat_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_chat_chat_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumMessages: 13,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -684,8 +684,11 @@ type NoticeUserCloseReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UserSessionId string `protobuf:"bytes,1,opt,name=UserSessionId,proto3" json:"UserSessionId"`
|
||||
UserId string `protobuf:"bytes,2,opt,name=UserId,proto3" json:"UserId"`
|
||||
Ip string `protobuf:"bytes,1,opt,name=Ip,proto3" json:"Ip"`
|
||||
UserSessionId string `protobuf:"bytes,2,opt,name=UserSessionId,proto3" json:"UserSessionId"`
|
||||
UserId string `protobuf:"bytes,3,opt,name=UserId,proto3" json:"UserId"`
|
||||
ServiceTag string `protobuf:"bytes,4,opt,name=ServiceTag,proto3" json:"ServiceTag"`
|
||||
GatewayServiceId string `protobuf:"bytes,5,opt,name=GatewayServiceId,proto3" json:"GatewayServiceId"`
|
||||
}
|
||||
|
||||
func (x *NoticeUserCloseReq) Reset() {
|
||||
@ -720,6 +723,13 @@ func (*NoticeUserCloseReq) Descriptor() ([]byte, []int) {
|
||||
return file_comm_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *NoticeUserCloseReq) GetIp() string {
|
||||
if x != nil {
|
||||
return x.Ip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NoticeUserCloseReq) GetUserSessionId() string {
|
||||
if x != nil {
|
||||
return x.UserSessionId
|
||||
@ -734,6 +744,20 @@ func (x *NoticeUserCloseReq) GetUserId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NoticeUserCloseReq) GetServiceTag() string {
|
||||
if x != nil {
|
||||
return x.ServiceTag
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NoticeUserCloseReq) GetGatewayServiceId() string {
|
||||
if x != nil {
|
||||
return x.GatewayServiceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
//用户资产数据 对标*cfg.Game_atn 数据结构
|
||||
type UserAssets struct {
|
||||
state protoimpl.MessageState
|
||||
@ -924,23 +948,29 @@ var file_comm_proto_rawDesc = []byte{
|
||||
0x74, 0x61, 0x22, 0x36, 0x0a, 0x0e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65,
|
||||
0x65, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65,
|
||||
0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x52, 0x0a, 0x12, 0x4e, 0x6f,
|
||||
0x74, 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x36,
|
||||
0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x0c, 0x0a, 0x01,
|
||||
0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x41, 0x12, 0x0c, 0x0a, 0x01, 0x54, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x54, 0x12, 0x0c, 0x0a, 0x01, 0x4e, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x01, 0x4e, 0x22, 0x21, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, 0x72,
|
||||
0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01,
|
||||
0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65,
|
||||
0x65, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xae, 0x01, 0x0a, 0x12, 0x4e,
|
||||
0x6f, 0x74, 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65,
|
||||
0x71, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49,
|
||||
0x70, 0x12, 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49,
|
||||
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x12,
|
||||
0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77,
|
||||
0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x0a, 0x55,
|
||||
0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x41, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x41, 0x12, 0x0c, 0x0a, 0x01, 0x54, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x01, 0x54, 0x12, 0x0c, 0x0a, 0x01, 0x4e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x01, 0x4e, 0x22, 0x21, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74,
|
||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02,
|
||||
0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a,
|
||||
0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10,
|
||||
0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -15,10 +15,11 @@ message DBChat {
|
||||
ChatChannel channel = 2; //频道
|
||||
string suid =3; //发送用户id
|
||||
string ruid = 4; //接收用户id channel == Private 有效
|
||||
int32 areaId = 5; //跨服频道Id
|
||||
string unionId = 6; //工会id
|
||||
int32 headid = 7; //用户头像
|
||||
string uname = 8; //用户名
|
||||
string content = 9; //内容
|
||||
int64 ctime = 10; //创建时间
|
||||
int32 groud = 5; //跨服频道 分组id
|
||||
int32 areaId = 6; //跨服频道 频道Id
|
||||
string unionId = 7; //工会id
|
||||
int32 headid = 8; //用户头像
|
||||
string uname = 9; //用户名
|
||||
string content = 10; //内容
|
||||
int64 ctime = 11; //创建时间
|
||||
}
|
@ -4,7 +4,7 @@ import "chat/chat_db.proto";
|
||||
|
||||
//聊天消息推送
|
||||
message ChatMessagePush{
|
||||
repeated DBChat Chats = 1;
|
||||
repeated DBChat chats = 1;
|
||||
}
|
||||
|
||||
//申请跨服频道号
|
||||
@ -13,15 +13,37 @@ message ChatCrossChannelReq {
|
||||
}
|
||||
//申请跨服频道号 回应
|
||||
message ChatCrossChannelResp {
|
||||
int32 ChannelId = 1;
|
||||
int32 channelId = 1;
|
||||
}
|
||||
|
||||
//请求未读消息
|
||||
//申请切换频道
|
||||
message ChatChanageChannelReq {
|
||||
int32 channelId = 1;
|
||||
}
|
||||
//申请切换频道 回应
|
||||
message ChatChanageChannelResp {
|
||||
int32 channelId = 1;
|
||||
bool isSucc = 2;
|
||||
}
|
||||
|
||||
//请求聊天消息
|
||||
message ChatGetListReq {
|
||||
|
||||
ChatChannel channel = 1; //频道
|
||||
}
|
||||
//请求聊天消息 回应
|
||||
message ChatGetListResp {
|
||||
repeated DBChat Chats = 1;
|
||||
repeated DBChat chats = 1;
|
||||
}
|
||||
|
||||
|
||||
//请求跨服聊天消息
|
||||
message ChatSpanGetListReq {
|
||||
ChatChannel channel = 1; //频道
|
||||
int32 channelId = 2; //跨服频道id
|
||||
}
|
||||
//请求跨服聊天消息 回应
|
||||
message ChatSpanGetListResp {
|
||||
repeated DBChat chats = 1;
|
||||
}
|
||||
|
||||
//消息发送请求
|
||||
|
@ -67,8 +67,11 @@ message AgentCloseeReq { string UserSessionId = 1; }
|
||||
|
||||
//通知用户离线
|
||||
message NoticeUserCloseReq {
|
||||
string UserSessionId = 1;
|
||||
string UserId = 2;
|
||||
string Ip = 1;
|
||||
string UserSessionId = 2;
|
||||
string UserId = 3;
|
||||
string ServiceTag = 4;
|
||||
string GatewayServiceId = 5;
|
||||
}
|
||||
|
||||
//英雄属性类型
|
||||
|
@ -7,5 +7,5 @@ message DBUserExpand {
|
||||
string id = 1; //主键id
|
||||
string uid = 2; //用户id
|
||||
int64 lastreadnotiftime = 3; //最后阅读公告时间
|
||||
int32 ChatChannel = 4; //跨服聊天频道
|
||||
int32 chatchannel = 4; //跨服聊天频道
|
||||
}
|
@ -29,7 +29,7 @@ type DBUserExpand struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //主键id
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id
|
||||
Lastreadnotiftime int64 `protobuf:"varint,3,opt,name=lastreadnotiftime,proto3" json:"lastreadnotiftime"` //最后阅读公告时间
|
||||
ChatChannel int32 `protobuf:"varint,4,opt,name=ChatChannel,proto3" json:"ChatChannel"` //跨服聊天频道
|
||||
Chatchannel int32 `protobuf:"varint,4,opt,name=chatchannel,proto3" json:"chatchannel"` //跨服聊天频道
|
||||
}
|
||||
|
||||
func (x *DBUserExpand) Reset() {
|
||||
@ -85,9 +85,9 @@ func (x *DBUserExpand) GetLastreadnotiftime() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBUserExpand) GetChatChannel() int32 {
|
||||
func (x *DBUserExpand) GetChatchannel() int32 {
|
||||
if x != nil {
|
||||
return x.ChatChannel
|
||||
return x.Chatchannel
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -102,8 +102,8 @@ var file_userexpand_proto_rawDesc = []byte{
|
||||
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61,
|
||||
0x64, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x64, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e,
|
||||
0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68,
|
||||
0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x74, 0x63, 0x68, 0x61, 0x6e, 0x6e,
|
||||
0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x74, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
@ -170,14 +170,16 @@ func (this *SCompGateRoute) ReceiveMsg(ctx context.Context, args *pb.AgentMessag
|
||||
|
||||
//RPC_NoticeUserClose 接收用户离线通知
|
||||
func (this *SCompGateRoute) NoticeUserClose(ctx context.Context, args *pb.NoticeUserCloseReq, reply *pb.RPCMessageReply) error {
|
||||
event.TriggerEvent(comm.EventUserOffline, args.UserId)
|
||||
session := this.pools.Get().(comm.IUserSession)
|
||||
session.SetSession(args.Ip, args.UserSessionId, args.ServiceTag, args.GatewayServiceId, args.UserId)
|
||||
event.TriggerEvent(comm.EventUserOffline, session)
|
||||
return nil
|
||||
}
|
||||
|
||||
//获取用户的会话对象
|
||||
func (this *SCompGateRoute) GetUserSession(udata *pb.CacheUser) (session comm.IUserSession) {
|
||||
session = this.pools.Get().(comm.IUserSession)
|
||||
session.SetSession("", udata.SessionId, udata.ServiceTag, udata.GatewayServiceId, udata.Uid)
|
||||
session.SetSession(udata.Ip, udata.SessionId, udata.ServiceTag, udata.GatewayServiceId, udata.Uid)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user