Jelajahi Sumber

fix:消息列表页区分pc移动

duxin 2 tahun lalu
induk
melakukan
c4dfc0b7a5

+ 9 - 7
api/internal/logic/messagelistlogic.go

@@ -31,13 +31,15 @@ func (l *MessageListLogic) MessageList(req *types.MessageListReq) (resp *types.M
 	lsi := l.svcCtx.MessageCenter
 	fmt.Println(req)
 	res, err := lsi.UserMsgList(l.ctx, &messageclient.UserMsgListReq{
-		MsgType:  req.MsgType,
-		Appid:    req.AppId,
-		SortSize: req.SortSize,
-		UserId:   req.UserId,
-		Read:     req.IsRead,
-		OffSet:   req.Offset,
-		PageSize: req.Size,
+		MsgType:    req.MsgType,
+		Appid:      req.AppId,
+		SortSize:   req.SortSize,
+		UserId:     req.UserId,
+		Read:       req.IsRead,
+		OffSet:     req.Offset,
+		PageSize:   req.Size,
+		IsPc:       req.IsPc,
+		MobileHome: req.MobileHome,
 	})
 	if err != nil {
 		return nil, err

+ 10 - 8
api/internal/types/types.go

@@ -159,14 +159,16 @@ type ClearUnreadMsgReq struct {
 }
 
 type MessageListReq struct {
-	UserId   string `header:"mgoUserId"`
-	AppId    string `header:"appId"`
-	EntId    int64  `header:"entId,optional"`
-	SortSize int64  `json:"sortSize,optional"` //分类获取数
-	Offset   int64  `json:"offset"`            //
-	Size     int64  `json:"size,optional"`
-	MsgType  int64  `json:"msgType,optional"`
-	IsRead   int64  `json:"isRead,optional"`
+	UserId     string `header:"mgoUserId"`
+	AppId      string `header:"appId"`
+	EntId      int64  `header:"entId,optional"`
+	SortSize   int64  `json:"sortSize,optional"` //分类获取数
+	Offset     int64  `json:"offset"`            //
+	Size       int64  `json:"size,optional"`
+	MsgType    int64  `json:"msgType,optional"`
+	IsRead     int64  `json:"isRead,optional"`
+	IsPc       bool   `json:"isPc"`
+	MobileHome bool   `json:"mobileHome"`
 }
 
 type MessageListResp struct {

+ 10 - 8
api/message.api

@@ -156,14 +156,16 @@ type ClearUnreadMsgReq {
 }
 
 type MessageListReq {
-	UserId   string `header:"mgoUserId"`
-	AppId    string `header:"appId"`
-	EntId    int64  `header:"entId,optional"`
-	SortSize int64  `json:"sortSize,optional"` //分类获取数
-	Offset   int64  `json:"offset"`            //
-	Size     int64  `json:"size,optional"`
-	MsgType  int64  `json:"msgType,optional"`
-	IsRead   int64  `json:"isRead,optional"`
+	UserId     string `header:"mgoUserId"`
+	AppId      string `header:"appId"`
+	EntId      int64  `header:"entId,optional"`
+	SortSize   int64  `json:"sortSize,optional"` //分类获取数
+	Offset     int64  `json:"offset"`            //
+	Size       int64  `json:"size,optional"`
+	MsgType    int64  `json:"msgType,optional"`
+	IsRead     int64  `json:"isRead,optional"`
+	IsPc       bool   `json:"isPc"`
+	MobileHome bool   `json:"mobileHome"`
 }
 
 type MessageListResp {

+ 1 - 0
rpc/internal/logic/usermsglistlogic.go

@@ -28,6 +28,7 @@ func NewUserMsgListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserM
 // new用户消息列表
 func (l *UserMsgListLogic) UserMsgList(in *message.UserMsgListReq) (*message.UserMsgListRes, error) {
 	// todo: add your logic here and delete this line
+
 	data := new(message.UserMsgListRes)
 	res1 := service.UserMsgList(in)    //具体信息
 	res2 := service.MessageGetLast(in) //最新信息

+ 12 - 12
rpc/internal/server/messageserver.go

@@ -28,7 +28,7 @@ func (s *MessageServer) MultipleSaveMsg(ctx context.Context, in *message.Multipl
 	return l.MultipleSaveMsg(in)
 }
 
-// 修改消息阅读状态
+//  修改消息阅读状态
 func (s *MessageServer) ChangeReadStatus(ctx context.Context, in *message.ChangeReadStatusRequest) (*message.Response, error) {
 	l := logic.NewChangeReadStatusLogic(ctx, s.svcCtx)
 	return l.ChangeReadStatus(in)
@@ -40,37 +40,37 @@ func (s *MessageServer) SendUserMsg(ctx context.Context, in *message.SendMsgRequ
 	return l.SendUserMsg(in)
 }
 
-// 删除单一消息
+//  删除单一消息
 func (s *MessageServer) DeleteSingleMessage(ctx context.Context, in *message.DeleteSingleMessageRequest) (*message.Response, error) {
 	l := logic.NewDeleteSingleMessageLogic(ctx, s.svcCtx)
 	return l.DeleteSingleMessage(in)
 }
 
-// 删除多条消息
+//  删除多条消息
 func (s *MessageServer) DeleteMultipleMessage(ctx context.Context, in *message.DeleteMultipleMessageRequest) (*message.Response, error) {
 	l := logic.NewDeleteMultipleMessageLogic(ctx, s.svcCtx)
 	return l.DeleteMultipleMessage(in)
 }
 
-// 查询指定用户未读消息合计
+//   查询指定用户未读消息合计
 func (s *MessageServer) GetUnreadCount(ctx context.Context, in *message.GetUnreadCountRequest) (*message.GetUnreadCountResponse, error) {
 	l := logic.NewGetUnreadCountLogic(ctx, s.svcCtx)
 	return l.GetUnreadCount(in)
 }
 
-// 查询指定用户的历史消息记录
+//   查询指定用户的历史消息记录
 func (s *MessageServer) FindUserMsg(ctx context.Context, in *message.FindUserMsgReq) (*message.FindUserMsgRes, error) {
 	l := logic.NewFindUserMsgLogic(ctx, s.svcCtx)
 	return l.FindUserMsg(in)
 }
 
-// 查询指定用户指定分类的未读消息合计
+//   查询指定用户指定分类的未读消息合计
 func (s *MessageServer) GetClassUnreadCount(ctx context.Context, in *message.GetClassUnreadCountReq) (*message.GetUnreadCountResponse, error) {
 	l := logic.NewGetClassUnreadCountLogic(ctx, s.svcCtx)
 	return l.GetClassUnreadCount(in)
 }
 
-// 获取指定用户指定分类的最新一条消息
+//   获取指定用户指定分类的最新一条消息
 func (s *MessageServer) GetLastMessage(ctx context.Context, in *message.GetLastMessageReq) (*message.GetLastMessageRes, error) {
 	l := logic.NewGetLastMessageLogic(ctx, s.svcCtx)
 	return l.GetLastMessage(in)
@@ -82,13 +82,13 @@ func (s *MessageServer) FindMessageDetail(ctx context.Context, in *message.Messa
 	return l.FindMessageDetail(in)
 }
 
-// 获取指定用户的分类及未读消息数量
+//   获取指定用户的分类及未读消息数量
 func (s *MessageServer) GetUnreadClassCount(ctx context.Context, in *message.GetUnreadClassCountReq) (*message.GetUnreadClassCountRes, error) {
 	l := logic.NewGetUnreadClassCountLogic(ctx, s.svcCtx)
 	return l.GetUnreadClassCount(in)
 }
 
-// 获取指定用户收到消息的分类
+//   获取指定用户收到消息的分类
 func (s *MessageServer) GetMsgType(ctx context.Context, in *message.GetMsgTypeReq) (*message.GetMsgTypeRes, error) {
 	l := logic.NewGetMsgTypeLogic(ctx, s.svcCtx)
 	return l.GetMsgType(in)
@@ -100,19 +100,19 @@ func (s *MessageServer) UpdateMessageRead(ctx context.Context, in *message.Updat
 	return l.UpdateMessageRead(in)
 }
 
-// 查询指定用户的浮标消息
+//   查询指定用户的浮标消息
 func (s *MessageServer) FindUserBuoyMsg(ctx context.Context, in *message.FindUserBuoyMsgReq) (*message.FindUserBuoyMsgRes, error) {
 	l := logic.NewFindUserBuoyMsgLogic(ctx, s.svcCtx)
 	return l.FindUserBuoyMsg(in)
 }
 
-// 一键清空未读消息
+//    一键清空未读消息
 func (s *MessageServer) ClearUnreadMsg(ctx context.Context, in *message.ClearUnreadMsgReq) (*message.Response, error) {
 	l := logic.NewClearUnreadMsgLogic(ctx, s.svcCtx)
 	return l.ClearUnreadMsg(in)
 }
 
-// new用户消息列表
+//    new用户消息列表
 func (s *MessageServer) UserMsgList(ctx context.Context, in *message.UserMsgListReq) (*message.UserMsgListRes, error) {
 	l := logic.NewUserMsgListLogic(ctx, s.svcCtx)
 	return l.UserMsgList(in)

+ 2 - 0
rpc/message.proto

@@ -210,6 +210,8 @@ message UserMsgListReq {
     int64 msgType = 6; //是否区分类型
     int64 read = 7; // 是否区分已读未读 -1 不区分已读未读  0 未读 1 已读
     int64 SortSize = 8; //分类 每类数
+    bool isPc = 9;
+    bool  mobileHome = 10;
 }
 
 message UserMsgListRes {

+ 134 - 115
rpc/type/message/message.pb.go

@@ -2114,13 +2114,15 @@ type UserMsgListReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	UserId   string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`      //用户id
-	Appid    string `protobuf:"bytes,3,opt,name=appid,proto3" json:"appid,omitempty"`        //应用标识
-	OffSet   int64  `protobuf:"varint,4,opt,name=offSet,proto3" json:"offSet,omitempty"`     //当前
-	PageSize int64  `protobuf:"varint,5,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //大小
-	MsgType  int64  `protobuf:"varint,6,opt,name=msgType,proto3" json:"msgType,omitempty"`   //是否区分类型
-	Read     int64  `protobuf:"varint,7,opt,name=read,proto3" json:"read,omitempty"`         // 是否区分已读未读 -1 不区分已读未读  0 未读 1 已读
-	SortSize int64  `protobuf:"varint,8,opt,name=SortSize,proto3" json:"SortSize,omitempty"` //分类 每类数
+	UserId     string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`      //用户id
+	Appid      string `protobuf:"bytes,3,opt,name=appid,proto3" json:"appid,omitempty"`        //应用标识
+	OffSet     int64  `protobuf:"varint,4,opt,name=offSet,proto3" json:"offSet,omitempty"`     //当前
+	PageSize   int64  `protobuf:"varint,5,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //大小
+	MsgType    int64  `protobuf:"varint,6,opt,name=msgType,proto3" json:"msgType,omitempty"`   //是否区分类型
+	Read       int64  `protobuf:"varint,7,opt,name=read,proto3" json:"read,omitempty"`         // 是否区分已读未读 -1 不区分已读未读  0 未读 1 已读
+	SortSize   int64  `protobuf:"varint,8,opt,name=SortSize,proto3" json:"SortSize,omitempty"` //分类 每类数
+	IsPc       bool   `protobuf:"varint,9,opt,name=isPc,proto3" json:"isPc,omitempty"`
+	MobileHome bool   `protobuf:"varint,10,opt,name=mobileHome,proto3" json:"mobileHome,omitempty"`
 }
 
 func (x *UserMsgListReq) Reset() {
@@ -2204,6 +2206,20 @@ func (x *UserMsgListReq) GetSortSize() int64 {
 	return 0
 }
 
+func (x *UserMsgListReq) GetIsPc() bool {
+	if x != nil {
+		return x.IsPc
+	}
+	return false
+}
+
+func (x *UserMsgListReq) GetMobileHome() bool {
+	if x != nil {
+		return x.MobileHome
+	}
+	return false
+}
+
 type UserMsgListRes struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -2671,7 +2687,7 @@ var file_message_proto_rawDesc = []byte{
 	0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
 	0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74,
 	0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0xbc, 0x01, 0x0a, 0x0e,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0xf0, 0x01, 0x0a, 0x0e,
 	0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16,
 	0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
 	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18,
@@ -2683,115 +2699,118 @@ var file_message_proto_rawDesc = []byte{
 	0x03, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65,
 	0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x1a,
 	0x0a, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x0e, 0x55,
-	0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x12, 0x12, 0x0a,
-	0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64,
-	0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x6c,
-	0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x04, 0x6c, 0x69,
-	0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
-	0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x73, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x06, 0x63, 0x6f, 0x6c,
-	0x75, 0x6d, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x52, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73,
+	0x50, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x50, 0x63, 0x12, 0x1e,
+	0x0a, 0x0a, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x48, 0x6f, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01,
+	0x28, 0x08, 0x52, 0x0a, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x48, 0x6f, 0x6d, 0x65, 0x22, 0xd0,
+	0x01, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+	0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
+	0x25, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73,
+	0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x04,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x12, 0x2c, 0x0a,
+	0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x6c, 0x6c, 0x53, 0x6f, 0x72, 0x74, 0x44,
+	0x61, 0x74, 0x61, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63,
+	0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
+	0x74, 0x22, 0x7c, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74,
+	0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11,
+	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x44,
+	0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73,
 	0x61, 0x67, 0x65, 0x2e, 0x41, 0x6c, 0x6c, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52,
-	0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
-	0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7c, 0x0a,
-	0x0b, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04,
-	0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x04, 0x64,
-	0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x18,
-	0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
-	0x41, 0x6c, 0x6c, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x73, 0x6f, 0x72,
-	0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x0b,
-	0x41, 0x6c, 0x6c, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x75,
-	0x6e, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x6d, 0x67, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x6d, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67,
-	0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54,
-	0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28,
-	0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xba, 0x09, 0x0a, 0x07, 0x4d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70,
-	0x6c, 0x65, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x53, 0x61, 0x76, 0x65,
-	0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x73, 0x67,
-	0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65,
-	0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61,
-	0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a,
-	0x0b, 0x53, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65,
-	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
-	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65,
-	0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
-	0x23, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
-	0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71,
-	0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74,
-	0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x12, 0x25, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
-	0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x47, 0x65,
-	0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64,
-	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64,
-	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a,
-	0x0b, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d,
-	0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
-	0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x12, 0x57,
-	0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64,
-	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
-	0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f,
-	0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x61,
-	0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x08, 0x73, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75,
+	0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22,
+	0x9c, 0x01, 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12,
+	0x26, 0x0a, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69,
+	0x6d, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x6d, 0x67, 0x12, 0x18, 0x0a,
+	0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
+	0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
+	0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
+	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xba,
+	0x09, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x6d, 0x75,
+	0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x1b, 0x2e,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65,
+	0x53, 0x61, 0x76, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x53, 0x61, 0x76,
+	0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e,
+	0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x61,
+	0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11,
+	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x12, 0x39, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67,
+	0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d,
+	0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x13,
+	0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x65,
+	0x6c, 0x65, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x15, 0x44,
+	0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44,
+	0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51,
+	0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+	0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e,
+	0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e,
+	0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x12, 0x3f, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67,
+	0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55,
+	0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52,
+	0x65, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x6e,
+	0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x6e, 0x72, 0x65,
+	0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f,
+	0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x47,
+	0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x4d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73,
 	0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
-	0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
-	0x73, 0x12, 0x4a, 0x0a, 0x11, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
-	0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a,
-	0x13, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43,
-	0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47,
-	0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75,
-	0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
-	0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f,
-	0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d, 0x73, 0x67,
-	0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47,
-	0x65, 0x74, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70,
-	0x65, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64,
-	0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x6f, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x1b, 0x2e, 0x6d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75,
-	0x6f, 0x79, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x6f, 0x79, 0x4d,
-	0x73, 0x67, 0x52, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x55, 0x6e,
-	0x72, 0x65, 0x61, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x73, 0x67,
-	0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65,
-	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73,
-	0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
-	0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17,
-	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67,
-	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x67, 0x65, 0x52, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x11, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x19, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61,
+	0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
+	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x57, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6c,
+	0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6c, 0x61, 0x73,
+	0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6c, 0x61,
+	0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x47, 0x65,
+	0x74, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x73,
+	0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61,
+	0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1d, 0x2e,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0f,
+	0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x6f, 0x79, 0x4d, 0x73, 0x67, 0x12,
+	0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73,
+	0x65, 0x72, 0x42, 0x75, 0x6f, 0x79, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42,
+	0x75, 0x6f, 0x79, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0e, 0x43, 0x6c, 0x65,
+	0x61, 0x72, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x1a, 0x2e, 0x6d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x55, 0x6e, 0x72, 0x65, 0x61,
+	0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0b, 0x55, 0x73,
+	0x65, 0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52,
+	0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65,
+	0x72, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 68 - 60
service/sendMsg.go

@@ -149,6 +149,7 @@ func FindUserMsg(this message.FindUserMsgReq, isClean bool) message.FindUserMsgR
 	return data
 }
 
+// this.IsPc 是否pc端请求 this.MobileHome是否移动消息列表页
 func UserMsgList(this *message.UserMsgListReq) *message.UserMsgList {
 	var count int64
 	cquery := map[string]interface{}{
@@ -163,9 +164,9 @@ func UserMsgList(this *message.UserMsgListReq) *message.UserMsgList {
 		cquery["isRead"] = this.Read
 	}
 	data := new(message.UserMsgList)
-	//获取栏目下的护具
-	if this.MsgType == -1 {
-		sData := make(map[string][]*message.Messages)
+	//获取栏目下的数据
+	sData := make(map[string][]*message.Messages)
+	if this.MobileHome {
 		if this.SortSize > 0 {
 			sortData := entity.Mysql.SelectBySql(fmt.Sprintf(`SELECT * FROM (
   			SELECT *, ROW_NUMBER() OVER (PARTITION BY msg_type, receive_userid ORDER BY createtime DESC) AS row_num
@@ -201,9 +202,11 @@ func UserMsgList(this *message.UserMsgListReq) *message.UserMsgList {
 				}
 			}
 		}
-		fmt.Println("1111", sData)
-		//消息栏目下的最新消息
-		var columnData []*message.AllSortData
+	}
+
+	//消息栏目下的最新消息
+	var columnData []*message.AllSortData
+	if this.IsPc || this.MobileHome {
 		for _, v := range entity.MessageColumn {
 			var column message.AllSortData
 			column.Name = common.InterfaceToStr(v["name"])
@@ -214,75 +217,80 @@ func UserMsgList(this *message.UserMsgListReq) *message.UserMsgList {
 				"receive_userid": this.UserId,
 				"isdel":          1,
 				"appid":          this.Appid,
+				"msg_type":       column.MsgType,
+				"isRead":         0,
 			}
-			sQuery["msg_type"] = column.MsgType
-			sQuery["isRead"] = 0
 			column.UnreadMessages = entity.Mysql.Count("message", sQuery)
 			column.Data = sData[common.InterfaceToStr(v["msg_type"])]
 			columnData = append(columnData, &column)
 		}
-		data.SortData = columnData
 	}
 
-	count = entity.Mysql.Count("message", cquery)
-	if count > 0 {
-		res := entity.Mysql.Find("message", cquery, "", "createtime desc", (int(this.OffSet)-1)*int(this.PageSize), int(this.PageSize))
-		if res != nil && len(*res) > 0 {
-			for _, v := range *res {
-				_id := util.Int64All(v["id"])
-				id := strconv.FormatInt(_id, 10)
-				data.Data = append(data.Data, &message.Messages{
-					Id:            id,
-					Appid:         common.InterfaceToStr(v["appId"]),
-					ReceiveUserId: common.InterfaceToStr(v["receive_userid"]),
-					ReceiveName:   common.InterfaceToStr(v["receive_name"]),
-					SendUserId:    common.InterfaceToStr(v["send_userid"]),
-					SendName:      common.InterfaceToStr(v["send_name"]),
-					Createtime:    common.InterfaceToStr(v["createtime"]),
-					Title:         common.InterfaceToStr(v["title"]),
-					MsgType:       int64(util.IntAll(v["msg_type"])),
-					Link:          common.InterfaceToStr(v["link"]),
-					CiteId:        util.Int64All(v["cite_id"]),
-					Content:       common.InterfaceToStr(v["content"]),
-					IsRead:        util.Int64All(v["isRead"]),
-					MsgLogId:      util.Int64All(v["msg_log_id"]),
-				})
+	if this.IsPc || !this.MobileHome {
+		data.SortData = columnData
+		count = entity.Mysql.Count("message", cquery)
+		if count > 0 {
+			res := entity.Mysql.Find("message", cquery, "", "createtime desc", (int(this.OffSet)-1)*int(this.PageSize), int(this.PageSize))
+			if res != nil && len(*res) > 0 {
+				for _, v := range *res {
+					_id := util.Int64All(v["id"])
+					id := strconv.FormatInt(_id, 10)
+					data.Data = append(data.Data, &message.Messages{
+						Id:            id,
+						Appid:         common.InterfaceToStr(v["appId"]),
+						ReceiveUserId: common.InterfaceToStr(v["receive_userid"]),
+						ReceiveName:   common.InterfaceToStr(v["receive_name"]),
+						SendUserId:    common.InterfaceToStr(v["send_userid"]),
+						SendName:      common.InterfaceToStr(v["send_name"]),
+						Createtime:    common.InterfaceToStr(v["createtime"]),
+						Title:         common.InterfaceToStr(v["title"]),
+						MsgType:       int64(util.IntAll(v["msg_type"])),
+						Link:          common.InterfaceToStr(v["link"]),
+						CiteId:        util.Int64All(v["cite_id"]),
+						Content:       common.InterfaceToStr(v["content"]),
+						IsRead:        util.Int64All(v["isRead"]),
+						MsgLogId:      util.Int64All(v["msg_log_id"]),
+					})
+				}
 			}
 		}
+		data.Count = count
 	}
-	data.Count = count
+
 	return data
 }
 
 func MessageGetLast(this *message.UserMsgListReq) *message.Messages {
-	query := map[string]interface{}{
-		"receive_userid": this.UserId,
-		"isdel":          1,
-		"appid":          this.Appid,
-		"isRead":         0,
-		"msg_type":       1,
-	}
-	lastMsg := entity.Mysql.FindOne("message", query, "", "createtime desc")
-	if lastMsg != nil && len(*lastMsg) > 0 {
-		_id := util.Int64All((*lastMsg)["id"])
-		id := strconv.FormatInt(_id, 10)
-		msg := message.Messages{
-			Id:            id,
-			Appid:         common.InterfaceToStr((*lastMsg)["appid"]),
-			ReceiveUserId: common.InterfaceToStr((*lastMsg)["receive_userid"]),
-			ReceiveName:   common.InterfaceToStr((*lastMsg)["receive_name"]),
-			SendUserId:    common.InterfaceToStr((*lastMsg)["send_userid"]),
-			SendName:      common.InterfaceToStr((*lastMsg)["send_name"]),
-			Createtime:    common.InterfaceToStr((*lastMsg)["createtime"]),
-			Title:         common.InterfaceToStr((*lastMsg)["title"]),
-			MsgType:       common.Int64All((*lastMsg)["msg_type"]),
-			Link:          common.InterfaceToStr((*lastMsg)["link"]),
-			CiteId:        common.Int64All((*lastMsg)["cite_id"]),
-			Content:       common.InterfaceToStr((*lastMsg)["content"]),
-			IsRead:        common.Int64All((*lastMsg)["isRead"]),
-			MsgLogId:      common.Int64All((*lastMsg)["msg_log_id"]),
+	if this.IsPc || this.MobileHome {
+		query := map[string]interface{}{
+			"receive_userid": this.UserId,
+			"isdel":          1,
+			"appid":          this.Appid,
+			"isRead":         0,
+			"msg_type":       1,
+		}
+		lastMsg := entity.Mysql.FindOne("message", query, "", "createtime desc")
+		if lastMsg != nil && len(*lastMsg) > 0 {
+			_id := util.Int64All((*lastMsg)["id"])
+			id := strconv.FormatInt(_id, 10)
+			msg := message.Messages{
+				Id:            id,
+				Appid:         common.InterfaceToStr((*lastMsg)["appid"]),
+				ReceiveUserId: common.InterfaceToStr((*lastMsg)["receive_userid"]),
+				ReceiveName:   common.InterfaceToStr((*lastMsg)["receive_name"]),
+				SendUserId:    common.InterfaceToStr((*lastMsg)["send_userid"]),
+				SendName:      common.InterfaceToStr((*lastMsg)["send_name"]),
+				Createtime:    common.InterfaceToStr((*lastMsg)["createtime"]),
+				Title:         common.InterfaceToStr((*lastMsg)["title"]),
+				MsgType:       common.Int64All((*lastMsg)["msg_type"]),
+				Link:          common.InterfaceToStr((*lastMsg)["link"]),
+				CiteId:        common.Int64All((*lastMsg)["cite_id"]),
+				Content:       common.InterfaceToStr((*lastMsg)["content"]),
+				IsRead:        common.Int64All((*lastMsg)["isRead"]),
+				MsgLogId:      common.Int64All((*lastMsg)["msg_log_id"]),
+			}
+			return &msg
 		}
-		return &msg
 	}
 	return nil
 }