Просмотр исходного кода

Merge branch 'feature/v1.0.2' into feature/v1.0.2_wky

wangkaiyue 2 лет назад
Родитель
Сommit
9cd5fdd9e4

+ 10 - 6
api/messagecenter/internal/logic/userlistlogic.go

@@ -27,12 +27,15 @@ func NewUserListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserList
 func (l *UserListLogic) UserList(req *types.UserReq) (*types.CommonRes, error) {
 	// todo: add your logic here and delete this line
 	resp, err := l.svcCtx.Message.UserList(l.ctx, &messagecenter.UserReq{
-		Phone:     req.Phone,
-		UserType:  req.UserType,
-		StartTime: req.StartTime,
-		EndTime:   req.EndTime,
-		NewUserId: req.NewUserId,
-		EntUserId: req.EntUserId,
+		Phone:        req.Phone,
+		UserType:     req.UserType,
+		StartTime:    req.StartTime,
+		EndTime:      req.EndTime,
+		NewUserId:    req.NewUserId,
+		EntUserId:    req.EntUserId,
+		Page:         req.Page,
+		Size:         req.Size,
+		IsArtificial: req.IsArtificial,
 	})
 	if err != nil {
 		return nil, err
@@ -41,5 +44,6 @@ func (l *UserListLogic) UserList(req *types.UserReq) (*types.CommonRes, error) {
 		Error_msg:  resp.ErrorMsg,
 		Error_code: int(resp.ErrorCode),
 		Data:       resp.Data,
+		Count:      resp.Count,
 	}, nil
 }

+ 8 - 13
api/messagecenter/internal/logic/withdrawmessagelogic.go

@@ -1,12 +1,10 @@
 package logic
 
 import (
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-	"context"
-	"errors"
-
 	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/api/messagecenter/internal/svc"
 	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/api/messagecenter/internal/types"
+	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
+	"context"
 
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -29,19 +27,16 @@ func (l *WithdrawMessageLogic) WithdrawMessage(req *types.ReadWithdrawReq) (resp
 	// todo: add your logic here and delete this line
 	r, err := l.svcCtx.Message.WithdrawMessage(l.ctx, &messagecenter.ReadWithdrawReq{
 		MessageId: req.MessageId,
-		Content:   req.Content,
 		Appid:     req.Appid,
-		Type:      req.Type,
+		NewUserId: req.NewUserId,
 		UserType:  req.UserType,
-		Item:      req.Item,
-		Link:      req.Link,
-		SendId:    req.SendId,
+		EntUserId: req.EntUserId,
 	})
 	if err != nil {
 		return nil, err
 	}
-	if r.ErrorCode != 0 {
-		return nil, errors.New(r.ErrorMsg)
-	}
-	return
+	return &types.CommonRes{
+		Error_msg:  r.ErrorMsg,
+		Error_code: int(r.ErrorCode),
+	}, nil
 }

+ 11 - 12
api/messagecenter/internal/types/types.go

@@ -14,12 +14,15 @@ type CountResp struct {
 }
 
 type UserReq struct {
-	Phone     string `json:"phone,optional"`
-	UserType  int64  `json:"userType"`
-	StartTime string `json:"startTime,optional"`
-	EndTime   string `json:"endTime,optional"`
-	NewUserId int64  `header:"newUserId"`
-	EntUserId int64  `header:"entUserId,optional"`
+	Phone        string `json:"phone,optional"`
+	UserType     int64  `json:"userType"`
+	StartTime    string `json:"startTime,optional"`
+	EndTime      string `json:"endTime,optional"`
+	NewUserId    int64  `header:"newUserId"`
+	EntUserId    int64  `header:"entUserId,optional"`
+	Page         int64  `header:"page,optional"`
+	Size         int64  `header:"size,optional"`
+	IsArtificial int64  `header:"isArtificial,optional"`
 }
 
 type MessageEntity struct {
@@ -85,14 +88,10 @@ type ReadStateReq struct {
 
 type ReadWithdrawReq struct {
 	MessageId string `json:"messageId"`
-	Content   string `json:"content"`
 	Appid     string `header:"appid"`
-	Title     string `json:"title"`
-	Item      int64  `json:"item"`
+	NewUserId int64  `header:"newUserId,optional"`
+	EntUserId int64  `header:"entUserId,optional"`
 	UserType  int64  `json:"userType"`
-	Link      string `json:"link"`
-	SendId    int64  `json:"sendId,optional"`
-	Type      int64  `json:"type"`
 }
 
 type AppraiseMessageReq struct {

+ 11 - 12
api/messagecenter/messagecenter.api

@@ -10,12 +10,15 @@ type CountResp {
 }
 
 type UserReq {
-	Phone     string `json:"phone,optional"`
-	UserType  int64  `json:"userType"`
-	StartTime string `json:"startTime,optional"`
-	EndTime   string `json:"endTime,optional"`
-	NewUserId int64  `header:"newUserId"`
-	EntUserId int64  `header:"entUserId,optional"`
+	Phone        string `json:"phone,optional"`
+	UserType     int64  `json:"userType"`
+	StartTime    string `json:"startTime,optional"`
+	EndTime      string `json:"endTime,optional"`
+	NewUserId    int64  `header:"newUserId"`
+	EntUserId    int64  `header:"entUserId,optional"`
+	Page         int64  `header:"page,optional"`
+	Size         int64  `header:"size,optional"`
+	IsArtificial int64  `header:"isArtificial,optional"`
 }
 type MessageEntity {
 	OwnType   int64  `json:"ownType"`
@@ -75,14 +78,10 @@ type ReadStateReq {
 
 type ReadWithdrawReq {
 	MessageId string `json:"messageId"`
-	Content   string `json:"content"`
 	Appid     string `header:"appid"`
-	Title     string `json:"title"`
-	Item      int64  `json:"item"`
+	NewUserId int64  `header:"newUserId,optional"`
+	EntUserId int64  `header:"entUserId,optional"`
 	UserType  int64  `json:"userType"`
-	Link      string `json:"link"`
-	SendId    int64  `json:"sendId,optional"`
-	Type      int64  `json:"type"`
 }
 
 type AppraiseMessageReq {

+ 64 - 0
entity/util.go

@@ -5,6 +5,8 @@ import (
 	"app.yhyue.com/moapp/jybase/redis"
 	"encoding/json"
 	"fmt"
+	"reflect"
+	"sort"
 )
 
 const (
@@ -70,3 +72,65 @@ func GetData(userType int64, userId int64) (*SubPush, error) {
 func SetData(userType int64, userId int64, data map[string]interface{}, survivalTime int) {
 	redis.Put(redisModule, todayKey(userType, userId), data, survivalTime)
 }
+
+// 排序 排序键必须为数字类型
+type SortBy struct {
+	Data    []map[string]interface{}
+	Sortkey string
+}
+
+func (a SortBy) Len() int { return len(a.Data) }
+
+func (a SortBy) Swap(i, j int) {
+	a.Data[i], a.Data[j] = a.Data[j], a.Data[i]
+}
+
+func (a SortBy) Less(i, j int) bool {
+	//return Float64(a.Data[i][a.Sortkey]) < Float64(a.Data[j][a.Sortkey])
+	m := a.Data[i][a.Sortkey]
+	n := a.Data[j][a.Sortkey]
+	w := reflect.ValueOf(m)
+	v := reflect.ValueOf(n)
+	switch v.Kind() {
+	case reflect.String:
+		return w.String() < v.String()
+	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+		return w.Int() < v.Int()
+	case reflect.Float64, reflect.Float32:
+		return w.Float() < v.Float()
+	default:
+		return fmt.Sprintf("%v", w) < fmt.Sprintf("%v", v)
+	}
+}
+
+// 根据指定字符排序
+//
+//	m := []map[string]int{
+//	   {"k": 2},
+//	   {"k": 1},
+//	   {"k": 3},
+//	}
+//
+// customer.SortData(&m, "k", true)
+// ture  倒序3, 2, 1
+// fmt.Println(m)
+func SortData(data interface{}, sortkey string, reverse bool) {
+	//func SortData(data interface{}, sortkey string, reverse bool) {
+	var db []map[string]interface{}
+	err := quitl.Bind(data, &db)
+	if err != nil {
+		fmt.Println(err)
+		return
+	}
+	stb := SortBy{db, sortkey}
+	if !reverse {
+		sort.Sort(stb)
+	} else {
+		sort.Sort(sort.Reverse(stb))
+	}
+	err = quitl.Bind(stb.Data, data)
+	if err != nil {
+		fmt.Println(err)
+	}
+
+}

+ 2 - 2
rpc/messagecenter/internal/logic/userlistlogic.go

@@ -32,7 +32,7 @@ func NewUserListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserList
 func (l *UserListLogic) UserList(in *messagecenter.UserReq) (*messagecenter.UserResp, error) {
 	// todo: add your logic here and delete this line
 	m := service.MessaggeService{}
-	data, err := m.UserList(in)
+	data, count, err := m.UserList(in)
 	if err != nil {
 		return nil, err
 	}
@@ -53,5 +53,5 @@ func (l *UserListLogic) UserList(in *messagecenter.UserReq) (*messagecenter.User
 		}
 		result = append(result, &userResp)
 	}
-	return &messagecenter.UserResp{Data: result}, nil
+	return &messagecenter.UserResp{Data: result, Count: count}, nil
 }

+ 3 - 5
rpc/messagecenter/internal/logic/withdrawmessagelogic.go

@@ -2,11 +2,10 @@ package logic
 
 import (
 	util "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/entity"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service"
-	"context"
-
 	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
 	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
+	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service"
+	"context"
 
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -36,7 +35,6 @@ func (l *WithdrawMessageLogic) WithdrawMessage(in *messagecenter.ReadWithdrawReq
 			ErrorMsg:  "撤回消息失败",
 		}, nil
 	}
-
 	return &messagecenter.CurrencyResp{ErrorCode: util.SUCCESS_CODE,
-		ErrorMsg: ""}, nil
+		ErrorMsg: "撤回消息成功"}, nil
 }

+ 8 - 8
rpc/messagecenter/internal/server/messagecenterserver.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT.
+// Code generated by goctl. DO NOT EDIT!
 // Source: messagecenter.proto
 
 package server
@@ -22,37 +22,37 @@ func NewMessageCenterServer(svcCtx *svc.ServiceContext) *MessageCenterServer {
 	}
 }
 
-// 查询数量
+//  查询数量
 func (s *MessageCenterServer) Count(ctx context.Context, in *messagecenter.CountReq) (*messagecenter.CountResp, error) {
 	l := logic.NewCountLogic(ctx, s.svcCtx)
 	return l.Count(in)
 }
 
-// 用户列表查询
+//  用户列表查询
 func (s *MessageCenterServer) UserList(ctx context.Context, in *messagecenter.UserReq) (*messagecenter.UserResp, error) {
 	l := logic.NewUserListLogic(ctx, s.svcCtx)
 	return l.UserList(in)
 }
 
-// 聊天内容查询
+//  聊天内容查询
 func (s *MessageCenterServer) FindMessage(ctx context.Context, in *messagecenter.MessageReq) (*messagecenter.MessageResp, error) {
 	l := logic.NewFindMessageLogic(ctx, s.svcCtx)
 	return l.FindMessage(in)
 }
 
-// 聊天保存
+//  聊天保存
 func (s *MessageCenterServer) SaveMessage(ctx context.Context, in *messagecenter.MessageEntity) (*messagecenter.SaveMessageResp, error) {
 	l := logic.NewSaveMessageLogic(ctx, s.svcCtx)
 	return l.SaveMessage(in)
 }
 
-// 会话创建
+//  会话创建
 func (s *MessageCenterServer) CreateChatSession(ctx context.Context, in *messagecenter.ChatSessionReq) (*messagecenter.ChatSessionResp, error) {
 	l := logic.NewCreateChatSessionLogic(ctx, s.svcCtx)
 	return l.CreateChatSession(in)
 }
 
-// 会话关闭
+//  会话关闭
 func (s *MessageCenterServer) CloseChatSession(ctx context.Context, in *messagecenter.CloseSessionReq) (*messagecenter.ChatSessionResp, error) {
 	l := logic.NewCloseChatSessionLogic(ctx, s.svcCtx)
 	return l.CloseChatSession(in)
@@ -76,7 +76,7 @@ func (s *MessageCenterServer) WithdrawMessage(ctx context.Context, in *messagece
 	return l.WithdrawMessage(in)
 }
 
-// 用户评价回复
+//  用户评价回复
 func (s *MessageCenterServer) AppraiseMessage(ctx context.Context, in *messagecenter.AppraiseReq) (*messagecenter.CurrencyResp, error) {
 	l := logic.NewAppraiseMessageLogic(ctx, s.svcCtx)
 	return l.AppraiseMessage(in)

+ 0 - 1
rpc/messagecenter/messagecenter.go

@@ -26,7 +26,6 @@ func main() {
 		messagecenter.RegisterMessageCenterServer(grpcServer, srv)
 	})
 	defer s.Stop()
-
 	fmt.Printf("Starting rpc server at %s...\n", IC.C.ListenOn)
 	s.Start()
 }

+ 9 - 9
rpc/messagecenter/messagecenter.proto

@@ -21,11 +21,15 @@ message UserReq {
   int64     newUserId = 4;  //用户标识
   int64     userType=5;  //用户类型:2用户1客服
   int64     entUserId = 6;  //企业标识
+  int64     page = 7;  //页
+  int64     size =8; //数
+  int64     isArtificial =9; //是否人工介入 1:人工介入 2:非让人工介入
 }
 message UserResp {
    repeated UserEntity data=1;
    int64 error_code = 2; //响应代码
    string error_msg = 3; //响应消息
+  int64 count = 4; //响应代码
 }
 message UserEntity {
   string userId = 1;
@@ -118,15 +122,11 @@ message ReadStateReq {
 }
 
 message ReadWithdrawReq {
-  string         messageId = 1;
-  string        content = 2;
+  string        messageId = 1;
+  int64         entUserId = 2;
   string        appid=3;
-  string title = 4;
-  int64         item = 5;
-  int64     userType=6;      //用户类型:2用户1客服
-  string link = 7;
-  int64         sendId = 8;
-  int64         type = 9;
+  int64         newUserId = 4;
+  int64         userType=6;      //用户类型:2用户1客服
 }
 
 message AppraiseReq {
@@ -161,4 +161,4 @@ service messageCenter {
   rpc WithdrawMessage(ReadWithdrawReq)returns(CurrencyResp);
   // 用户评价回复
   rpc AppraiseMessage(AppraiseReq) returns(CurrencyResp);
-}
+}

+ 8 - 8
rpc/messagecenter/messagecenter/messagecenter.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT.
+// Code generated by goctl. DO NOT EDIT!
 // Source: messagecenter.proto
 
 package messagecenter
@@ -12,17 +12,17 @@ import (
 
 type (
 	MessageCenter interface {
-		// 查询数量
+		//  查询数量
 		Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error)
-		// 用户列表查询
+		//  用户列表查询
 		UserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResp, error)
-		// 聊天内容查询
+		//  聊天内容查询
 		FindMessage(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageResp, error)
-		// 聊天保存
+		//  聊天保存
 		SaveMessage(ctx context.Context, in *MessageEntity, opts ...grpc.CallOption) (*SaveMessageResp, error)
-		// 会话创建
+		//  会话创建
 		CreateChatSession(ctx context.Context, in *ChatSessionReq, opts ...grpc.CallOption) (*ChatSessionResp, error)
-		// 会话关闭
+		//  会话关闭
 		CloseChatSession(ctx context.Context, in *CloseSessionReq, opts ...grpc.CallOption) (*ChatSessionResp, error)
 		// 创建会话并且保存信息
 		SaveAutoReplyMsg(ctx context.Context, in *SaveAutoReplyReq, opts ...grpc.CallOption) (*MessageResp, error)
@@ -30,7 +30,7 @@ type (
 		UpdateReadById(ctx context.Context, in *ReadStateReq, opts ...grpc.CallOption) (*CurrencyResp, error)
 		// 用户撤回消息
 		WithdrawMessage(ctx context.Context, in *ReadWithdrawReq, opts ...grpc.CallOption) (*CurrencyResp, error)
-		// 用户评价回复
+		//  用户评价回复
 		AppraiseMessage(ctx context.Context, in *AppraiseReq, opts ...grpc.CallOption) (*CurrencyResp, error)
 	}
 

+ 260 - 259
rpc/messagecenter/messagecenter/messagecenter.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.30.0
-// 	protoc        v3.21.12
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.19.4
 // source: messagecenter.proto
 
 package messagecenter
@@ -159,12 +159,15 @@ type UserReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Phone     string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
-	StartTime string `protobuf:"bytes,2,opt,name=startTime,proto3" json:"startTime,omitempty"`
-	EndTime   string `protobuf:"bytes,3,opt,name=endTime,proto3" json:"endTime,omitempty"`
-	NewUserId int64  `protobuf:"varint,4,opt,name=newUserId,proto3" json:"newUserId,omitempty"` //用户标识
-	UserType  int64  `protobuf:"varint,5,opt,name=userType,proto3" json:"userType,omitempty"`   //用户类型:2用户1客服
-	EntUserId int64  `protobuf:"varint,6,opt,name=entUserId,proto3" json:"entUserId,omitempty"` //企业标识
+	Phone        string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
+	StartTime    string `protobuf:"bytes,2,opt,name=startTime,proto3" json:"startTime,omitempty"`
+	EndTime      string `protobuf:"bytes,3,opt,name=endTime,proto3" json:"endTime,omitempty"`
+	NewUserId    int64  `protobuf:"varint,4,opt,name=newUserId,proto3" json:"newUserId,omitempty"`       //用户标识
+	UserType     int64  `protobuf:"varint,5,opt,name=userType,proto3" json:"userType,omitempty"`         //用户类型:2用户1客服
+	EntUserId    int64  `protobuf:"varint,6,opt,name=entUserId,proto3" json:"entUserId,omitempty"`       //企业标识
+	Page         int64  `protobuf:"varint,7,opt,name=page,proto3" json:"page,omitempty"`                 //页
+	Size         int64  `protobuf:"varint,8,opt,name=size,proto3" json:"size,omitempty"`                 //数
+	IsArtificial int64  `protobuf:"varint,9,opt,name=isArtificial,proto3" json:"isArtificial,omitempty"` //是否人工介入 1:人工介入 2:非让人工介入
 }
 
 func (x *UserReq) Reset() {
@@ -241,6 +244,27 @@ func (x *UserReq) GetEntUserId() int64 {
 	return 0
 }
 
+func (x *UserReq) GetPage() int64 {
+	if x != nil {
+		return x.Page
+	}
+	return 0
+}
+
+func (x *UserReq) GetSize() int64 {
+	if x != nil {
+		return x.Size
+	}
+	return 0
+}
+
+func (x *UserReq) GetIsArtificial() int64 {
+	if x != nil {
+		return x.IsArtificial
+	}
+	return 0
+}
+
 type UserResp struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -249,6 +273,7 @@ type UserResp struct {
 	Data      []*UserEntity `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
 	ErrorCode int64         `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
 	ErrorMsg  string        `protobuf:"bytes,3,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`     //响应消息
+	Count     int64         `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`                          //响应代码
 }
 
 func (x *UserResp) Reset() {
@@ -304,6 +329,13 @@ func (x *UserResp) GetErrorMsg() string {
 	return ""
 }
 
+func (x *UserResp) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
 type UserEntity struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1244,14 +1276,10 @@ type ReadWithdrawReq struct {
 	unknownFields protoimpl.UnknownFields
 
 	MessageId string `protobuf:"bytes,1,opt,name=messageId,proto3" json:"messageId,omitempty"`
-	Content   string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
+	EntUserId int64  `protobuf:"varint,2,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
 	Appid     string `protobuf:"bytes,3,opt,name=appid,proto3" json:"appid,omitempty"`
-	Title     string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
-	Item      int64  `protobuf:"varint,5,opt,name=item,proto3" json:"item,omitempty"`
+	NewUserId int64  `protobuf:"varint,4,opt,name=newUserId,proto3" json:"newUserId,omitempty"`
 	UserType  int64  `protobuf:"varint,6,opt,name=userType,proto3" json:"userType,omitempty"` //用户类型:2用户1客服
-	Link      string `protobuf:"bytes,7,opt,name=link,proto3" json:"link,omitempty"`
-	SendId    int64  `protobuf:"varint,8,opt,name=sendId,proto3" json:"sendId,omitempty"`
-	Type      int64  `protobuf:"varint,9,opt,name=type,proto3" json:"type,omitempty"`
 }
 
 func (x *ReadWithdrawReq) Reset() {
@@ -1293,11 +1321,11 @@ func (x *ReadWithdrawReq) GetMessageId() string {
 	return ""
 }
 
-func (x *ReadWithdrawReq) GetContent() string {
+func (x *ReadWithdrawReq) GetEntUserId() int64 {
 	if x != nil {
-		return x.Content
+		return x.EntUserId
 	}
-	return ""
+	return 0
 }
 
 func (x *ReadWithdrawReq) GetAppid() string {
@@ -1307,16 +1335,9 @@ func (x *ReadWithdrawReq) GetAppid() string {
 	return ""
 }
 
-func (x *ReadWithdrawReq) GetTitle() string {
-	if x != nil {
-		return x.Title
-	}
-	return ""
-}
-
-func (x *ReadWithdrawReq) GetItem() int64 {
+func (x *ReadWithdrawReq) GetNewUserId() int64 {
 	if x != nil {
-		return x.Item
+		return x.NewUserId
 	}
 	return 0
 }
@@ -1328,27 +1349,6 @@ func (x *ReadWithdrawReq) GetUserType() int64 {
 	return 0
 }
 
-func (x *ReadWithdrawReq) GetLink() string {
-	if x != nil {
-		return x.Link
-	}
-	return ""
-}
-
-func (x *ReadWithdrawReq) GetSendId() int64 {
-	if x != nil {
-		return x.SendId
-	}
-	return 0
-}
-
-func (x *ReadWithdrawReq) GetType() int64 {
-	if x != nil {
-		return x.Type
-	}
-	return 0
-}
-
 type AppraiseReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1496,7 +1496,7 @@ var file_messagecenter_proto_rawDesc = []byte{
 	0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
 	0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65,
 	0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
-	0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0xaf, 0x01, 0x0a, 0x07, 0x55, 0x73, 0x65,
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0xfb, 0x01, 0x0a, 0x07, 0x55, 0x73, 0x65,
 	0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20,
 	0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74,
 	0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73,
@@ -1507,220 +1507,221 @@ var file_messagecenter_proto_rawDesc = []byte{
 	0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01,
 	0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09,
 	0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x75, 0x0a, 0x08, 0x55, 0x73,
-	0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
-	0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52,
-	0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63,
-	0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72,
-	0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73,
-	0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73,
-	0x67, 0x22, 0x9b, 0x02, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79,
-	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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
-	0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74,
-	0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
-	0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,
-	0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,
-	0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,
-	0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
-	0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
-	0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61,
-	0x64, 0x69, 0x6d, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64,
-	0x69, 0x6d, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18,
-	0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22,
-	0x9a, 0x02, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18,
-	0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
-	0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
-	0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08,
-	0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
-	0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64,
-	0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64,
-	0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c,
-	0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
-	0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74,
-	0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e,
-	0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f,
-	0x6d, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74,
-	0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, 0x91, 0x01, 0x0a,
-	0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05,
-	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75,
-	0x6e, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
-	0x32, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
-	0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04,
-	0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f,
-	0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43,
-	0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67,
-	0x22, 0x95, 0x01, 0x0a, 0x0f, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61,
-	0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a,
-	0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65,
-	0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
-	0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x95, 0x04, 0x0a, 0x0d, 0x4d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69,
-	0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
-	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, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74,
-	0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x12,
-	0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79,
-	0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
-	0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65,
-	0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64,
-	0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x1a, 0x0a,
-	0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e,
-	0x64, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49,
-	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0a,
+	0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
+	0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x12,
+	0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69,
+	0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x69,
+	0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x72, 0x74, 0x69,
+	0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x22, 0x8b, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
+	0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61,
+	0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64,
+	0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x14,
+	0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63,
+	0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x02, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x74,
+	0x69, 0x74, 0x79, 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, 0x12, 0x0a, 0x04, 0x6e,
+	0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+	0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e,
+	0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x18, 0x0a,
+	0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+	0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
+	0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
+	0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
+	0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x09,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07,
+	0x68, 0x65, 0x61, 0x64, 0x69, 0x6d, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68,
+	0x65, 0x61, 0x64, 0x69, 0x6d, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x6c, 0x69,
+	0x6e, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x6c, 0x69,
+	0x6e, 0x65, 0x22, 0x9a, 0x02, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
+	0x71, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75,
+	0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75,
+	0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x49,
+	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x12,
+	0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73,
+	0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x6e,
+	0x64, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07,
 	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
-	0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a,
-	0x08, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x07, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x6c,
-	0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x6c, 0x12, 0x1c, 0x0a, 0x09,
-	0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x09, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f,
-	0x62, 0x6f, 0x74, 0x49, 0x6d, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f,
-	0x62, 0x6f, 0x74, 0x49, 0x6d, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d,
-	0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65,
-	0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64, 0x18, 0x11, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64, 0x12, 0x16,
-	0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x49, 0x6d, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
-	0x6f, 0x77, 0x6e, 0x49, 0x6d, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65,
-	0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65,
-	0x22, 0xb4, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
-	0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x75, 0x73,
-	0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65,
-	0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
-	0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
-	0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
-	0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
-	0x72, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76,
-	0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x73, 0x65,
-	0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65,
-	0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73,
-	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74,
-	0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65,
-	0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72,
-	0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65,
-	0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69,
-	0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73,
-	0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xc8, 0x01, 0x0a, 0x10, 0x53, 0x61, 0x76, 0x65, 0x41, 0x75,
-	0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e,
-	0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
-	0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16,
-	0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
-	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79,
-	0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79,
-	0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05,
-	0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70,
-	0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x77, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18,
-	0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x77, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74,
-	0x22, 0x68, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
-	0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1c,
-	0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
-	0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xe5, 0x01, 0x0a, 0x0f, 0x52,
-	0x65, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x12, 0x1c,
-	0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 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, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18,
-	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
-	0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74,
-	0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79,
-	0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79,
-	0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64,
-	0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x12,
-	0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79,
-	0x70, 0x65, 0x22, 0x7b, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x52, 0x65,
-	0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65,
-	0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x18,
-	0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x22,
-	0x4a, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
+	0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
+	0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+	0x72, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75,
+	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73,
+	0x6f, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22,
+	0x91, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
+	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
+	0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e,
+	0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74,
+	0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72,
+	0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72,
+	0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
+	0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72,
+	0x4d, 0x73, 0x67, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12,
+	0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20,
 	0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b,
-	0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x32, 0xfc, 0x05, 0x0a, 0x0d,
-	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a,
-	0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a,
-	0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
-	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x08, 0x55, 0x73, 0x65,
-	0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63,
-	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e,
-	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73,
-	0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63,
-	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71,
-	0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
-	0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0b,
-	0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x6d, 0x65,
+	0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x95, 0x04, 0x0a, 0x0d,
+	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a,
+	0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69,
+	0x74, 0x6c, 0x65, 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, 0x12, 0x12, 0x0a,
+	0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x69, 0x74, 0x65,
+	0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65,
+	0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
+	0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70,
+	0x70, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64,
+	0x12, 0x1a, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x08, 0x69, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06,
+	0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65,
+	0x6e, 0x64, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
+	0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66,
+	0x6f, 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x6c, 0x12,
+	0x1c, 0x0a, 0x09, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x09, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a,
+	0x08, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x49, 0x6d, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x08, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x49, 0x6d, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x74,
+	0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x74, 0x4e,
+	0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64,
+	0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49,
+	0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x49, 0x6d, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x49, 0x6d, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, 0x61,
+	0x69, 0x73, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x70, 0x70, 0x72, 0x61,
+	0x69, 0x73, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73,
+	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11,
+	0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49,
+	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+	0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74,
+	0x6f, 0x6d, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73,
+	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x0f, 0x43, 0x6c,
+	0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
+	0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x0f, 0x43,
+	0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d,
+	0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a,
+	0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65,
+	0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73,
+	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xc8, 0x01, 0x0a, 0x10, 0x53, 0x61, 0x76,
+	0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a,
+	0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e,
+	0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,
+	0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65,
+	0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
+	0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x77, 0x46, 0x6f, 0x72, 0x6d,
+	0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x77, 0x46, 0x6f, 0x72,
+	0x6d, 0x61, 0x74, 0x22, 0x68, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65,
+	0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49,
+	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
+	0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x9d, 0x01,
+	0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65,
+	0x71, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12,
+	0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a,
+	0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70,
+	0x70, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x7b, 0x0a,
+	0x0b, 0x41, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
+	0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70,
+	0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64,
+	0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a,
+	0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x08, 0x61, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x22, 0x4a, 0x0a, 0x0c, 0x43, 0x75,
+	0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72,
+	0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72,
+	0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72,
+	0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x32, 0xfc, 0x05, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e,
+	0x74, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
+	0x72, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74,
+	0x12, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x44, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x12, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65,
 	0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x11, 0x43, 0x72, 0x65,
-	0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d,
-	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43,
-	0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e,
-	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68,
-	0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a,
-	0x10, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
-	0x6e, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
-	0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x4f, 0x0a, 0x10, 0x53, 0x61, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70,
-	0x6c, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63,
-	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x4a, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x64,
-	0x42, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65,
-	0x71, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4e,
-	0x0a, 0x0f, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65,
-	0x71, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4a,
-	0x0a, 0x0f, 0x41, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e,
-	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75,
-	0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f,
-	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x4d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e,
+	0x74, 0x69, 0x74, 0x79, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68,
+	0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65,
+	0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73,
+	0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73,
+	0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x6f,
+	0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61,
+	0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x10,
+	0x53, 0x61, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x73, 0x67,
+	0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x53, 0x61, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x65,
+	0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
+	0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a,
+	0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x64, 0x42, 0x79, 0x49, 0x64, 0x12,
+	0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
+	0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x72,
+	0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4e, 0x0a, 0x0f, 0x57, 0x69, 0x74,
+	0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61,
+	0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x72,
+	0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a, 0x0f, 0x41, 0x70, 0x70,
+	0x72, 0x61, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70,
+	0x72, 0x61, 0x69, 0x73, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63,
+	0x79, 0x52, 0x65, 0x73, 0x70, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 22 - 35
rpc/messagecenter/messagecenter/messagecenter_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
-// - protoc-gen-go-grpc v1.3.0
-// - protoc             v3.21.12
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.19.4
 // source: messagecenter.proto
 
 package messagecenter
@@ -18,19 +18,6 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
-const (
-	MessageCenter_Count_FullMethodName             = "/messagecenter.messageCenter/Count"
-	MessageCenter_UserList_FullMethodName          = "/messagecenter.messageCenter/UserList"
-	MessageCenter_FindMessage_FullMethodName       = "/messagecenter.messageCenter/FindMessage"
-	MessageCenter_SaveMessage_FullMethodName       = "/messagecenter.messageCenter/SaveMessage"
-	MessageCenter_CreateChatSession_FullMethodName = "/messagecenter.messageCenter/CreateChatSession"
-	MessageCenter_CloseChatSession_FullMethodName  = "/messagecenter.messageCenter/CloseChatSession"
-	MessageCenter_SaveAutoReplyMsg_FullMethodName  = "/messagecenter.messageCenter/SaveAutoReplyMsg"
-	MessageCenter_UpdateReadById_FullMethodName    = "/messagecenter.messageCenter/UpdateReadById"
-	MessageCenter_WithdrawMessage_FullMethodName   = "/messagecenter.messageCenter/WithdrawMessage"
-	MessageCenter_AppraiseMessage_FullMethodName   = "/messagecenter.messageCenter/AppraiseMessage"
-)
-
 // MessageCenterClient is the client API for MessageCenter service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -67,7 +54,7 @@ func NewMessageCenterClient(cc grpc.ClientConnInterface) MessageCenterClient {
 
 func (c *messageCenterClient) Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error) {
 	out := new(CountResp)
-	err := c.cc.Invoke(ctx, MessageCenter_Count_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/Count", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -76,7 +63,7 @@ func (c *messageCenterClient) Count(ctx context.Context, in *CountReq, opts ...g
 
 func (c *messageCenterClient) UserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResp, error) {
 	out := new(UserResp)
-	err := c.cc.Invoke(ctx, MessageCenter_UserList_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/UserList", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -85,7 +72,7 @@ func (c *messageCenterClient) UserList(ctx context.Context, in *UserReq, opts ..
 
 func (c *messageCenterClient) FindMessage(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageResp, error) {
 	out := new(MessageResp)
-	err := c.cc.Invoke(ctx, MessageCenter_FindMessage_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/FindMessage", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -94,7 +81,7 @@ func (c *messageCenterClient) FindMessage(ctx context.Context, in *MessageReq, o
 
 func (c *messageCenterClient) SaveMessage(ctx context.Context, in *MessageEntity, opts ...grpc.CallOption) (*SaveMessageResp, error) {
 	out := new(SaveMessageResp)
-	err := c.cc.Invoke(ctx, MessageCenter_SaveMessage_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/SaveMessage", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -103,7 +90,7 @@ func (c *messageCenterClient) SaveMessage(ctx context.Context, in *MessageEntity
 
 func (c *messageCenterClient) CreateChatSession(ctx context.Context, in *ChatSessionReq, opts ...grpc.CallOption) (*ChatSessionResp, error) {
 	out := new(ChatSessionResp)
-	err := c.cc.Invoke(ctx, MessageCenter_CreateChatSession_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/CreateChatSession", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -112,7 +99,7 @@ func (c *messageCenterClient) CreateChatSession(ctx context.Context, in *ChatSes
 
 func (c *messageCenterClient) CloseChatSession(ctx context.Context, in *CloseSessionReq, opts ...grpc.CallOption) (*ChatSessionResp, error) {
 	out := new(ChatSessionResp)
-	err := c.cc.Invoke(ctx, MessageCenter_CloseChatSession_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/CloseChatSession", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -121,7 +108,7 @@ func (c *messageCenterClient) CloseChatSession(ctx context.Context, in *CloseSes
 
 func (c *messageCenterClient) SaveAutoReplyMsg(ctx context.Context, in *SaveAutoReplyReq, opts ...grpc.CallOption) (*MessageResp, error) {
 	out := new(MessageResp)
-	err := c.cc.Invoke(ctx, MessageCenter_SaveAutoReplyMsg_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/SaveAutoReplyMsg", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -130,7 +117,7 @@ func (c *messageCenterClient) SaveAutoReplyMsg(ctx context.Context, in *SaveAuto
 
 func (c *messageCenterClient) UpdateReadById(ctx context.Context, in *ReadStateReq, opts ...grpc.CallOption) (*CurrencyResp, error) {
 	out := new(CurrencyResp)
-	err := c.cc.Invoke(ctx, MessageCenter_UpdateReadById_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/UpdateReadById", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -139,7 +126,7 @@ func (c *messageCenterClient) UpdateReadById(ctx context.Context, in *ReadStateR
 
 func (c *messageCenterClient) WithdrawMessage(ctx context.Context, in *ReadWithdrawReq, opts ...grpc.CallOption) (*CurrencyResp, error) {
 	out := new(CurrencyResp)
-	err := c.cc.Invoke(ctx, MessageCenter_WithdrawMessage_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/WithdrawMessage", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -148,7 +135,7 @@ func (c *messageCenterClient) WithdrawMessage(ctx context.Context, in *ReadWithd
 
 func (c *messageCenterClient) AppraiseMessage(ctx context.Context, in *AppraiseReq, opts ...grpc.CallOption) (*CurrencyResp, error) {
 	out := new(CurrencyResp)
-	err := c.cc.Invoke(ctx, MessageCenter_AppraiseMessage_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/AppraiseMessage", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -239,7 +226,7 @@ func _MessageCenter_Count_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_Count_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/Count",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).Count(ctx, req.(*CountReq))
@@ -257,7 +244,7 @@ func _MessageCenter_UserList_Handler(srv interface{}, ctx context.Context, dec f
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_UserList_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/UserList",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).UserList(ctx, req.(*UserReq))
@@ -275,7 +262,7 @@ func _MessageCenter_FindMessage_Handler(srv interface{}, ctx context.Context, de
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_FindMessage_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/FindMessage",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).FindMessage(ctx, req.(*MessageReq))
@@ -293,7 +280,7 @@ func _MessageCenter_SaveMessage_Handler(srv interface{}, ctx context.Context, de
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_SaveMessage_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/SaveMessage",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).SaveMessage(ctx, req.(*MessageEntity))
@@ -311,7 +298,7 @@ func _MessageCenter_CreateChatSession_Handler(srv interface{}, ctx context.Conte
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_CreateChatSession_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/CreateChatSession",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).CreateChatSession(ctx, req.(*ChatSessionReq))
@@ -329,7 +316,7 @@ func _MessageCenter_CloseChatSession_Handler(srv interface{}, ctx context.Contex
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_CloseChatSession_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/CloseChatSession",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).CloseChatSession(ctx, req.(*CloseSessionReq))
@@ -347,7 +334,7 @@ func _MessageCenter_SaveAutoReplyMsg_Handler(srv interface{}, ctx context.Contex
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_SaveAutoReplyMsg_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/SaveAutoReplyMsg",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).SaveAutoReplyMsg(ctx, req.(*SaveAutoReplyReq))
@@ -365,7 +352,7 @@ func _MessageCenter_UpdateReadById_Handler(srv interface{}, ctx context.Context,
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_UpdateReadById_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/UpdateReadById",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).UpdateReadById(ctx, req.(*ReadStateReq))
@@ -383,7 +370,7 @@ func _MessageCenter_WithdrawMessage_Handler(srv interface{}, ctx context.Context
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_WithdrawMessage_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/WithdrawMessage",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).WithdrawMessage(ctx, req.(*ReadWithdrawReq))
@@ -401,7 +388,7 @@ func _MessageCenter_AppraiseMessage_Handler(srv interface{}, ctx context.Context
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: MessageCenter_AppraiseMessage_FullMethodName,
+		FullMethod: "/messagecenter.messageCenter/AppraiseMessage",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(MessageCenterServer).AppraiseMessage(ctx, req.(*AppraiseReq))

+ 86 - 22
service/message_mail_box.go

@@ -30,7 +30,8 @@ func (b MessaggeService) Count(newUserId, userType, entUserId int64, isClean boo
 		sqlStr = fmt.Sprintf("select  count(b.id) from   %s a  "+
 			"LEFT  JOIN  %s  b ON a.id=b.own_id "+
 			"where  b.type=5 "+
-			"AND   a.customer_service_id=%d   "+
+			"AND   a.customer_service_id=%d  "+
+			"AND b.iswithdraw = 0  "+
 			"AND  b.isread=0  "+
 			"AND own_type = 1 "+
 			"order by create_time", util.SOCIALIZE_CHAT_SESSION, util.SOCIALIZE_MESSAGE_MAILBOX, entUserId)
@@ -44,7 +45,8 @@ func (b MessaggeService) Count(newUserId, userType, entUserId int64, isClean boo
 		}
 		sqlStr = fmt.Sprintf("select  count(b.id) from    %s  b "+
 			"where   b.send_user_id != %d    "+
-			"AND   b.own_id=%d  "+
+			"AND   b.own_id=%d "+
+			"AND b.iswithdraw = 0  "+
 			"AND  b.isread=0 "+
 			"AND own_type = 2 "+
 			"order by create_time", util.SOCIALIZE_MESSAGE_MAILBOX, newUserId, newUserId)
@@ -58,7 +60,8 @@ func (b MessaggeService) Count(newUserId, userType, entUserId int64, isClean boo
 	sqlStr = fmt.Sprintf("SELECT  c.* FROM %s  b   "+
 		"LEFT join %s c on  b.messag_id=c.id "+
 		"WHERE  b.send_user_id != %d   "+
-		"AND b.own_id = %d  "+
+		"AND b.own_id = %d "+
+		"AND b.iswithdraw = 0  "+
 		"AND   b.isread=0  "+
 		"AND own_type = 2  "+
 		"ORDER BY  create_time DESC   "+
@@ -83,8 +86,9 @@ func (b MessaggeService) Count(newUserId, userType, entUserId int64, isClean boo
 }
 
 // 用户列表查询
-func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string]interface{}, err error) {
+func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string]interface{}, count int64, err error) {
 	sqlStr := ""
+	tm := time.Now()
 	if in.UserType == 2 {
 		//用户最后一次信息查询
 		userSql := fmt.Sprintf("SELECT  MAX( c.id )   as messageId  FROM  socialize_message_mailbox c "+
@@ -154,23 +158,45 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 		if in.StartTime != "" {
 			startTimeSql = "AND  DATE_FORMAT(c.create_time,'%Y-%m-%d') >= '" + in.StartTime + "' "
 		}
+		idSql := fmt.Sprintf("(SELECT COUNT(e.id)  FROM socialize_chat_session e WHERE e.customer_service_id > 0 AND e.user_id = d.user_id ) =0 or d.customer_service_id=%d ", in.EntUserId)
+		if in.IsArtificial == 1 {
+			idSql = fmt.Sprintf("d.customer_service_id = %d ", in.EntUserId)
+		} else if in.IsArtificial == 2 {
+			idSql = "(SELECT COUNT(e.id)  FROM socialize_chat_session e WHERE e.customer_service_id > 0 AND e.user_id = d.user_id ) =0 "
+		}
 		endTimeSql := ""
 		if in.EndTime != "" {
 			endTimeSql = "AND DATE_FORMAT(c.create_time,'%Y-%m-%d') <= '" + in.EndTime + "' "
 		}
-		//先获取每个用户最后聊天记录
+		if in.Page <= 0 {
+			in.Page = 1
+		}
+		if in.Size <= 0 || in.Size > 100 {
+			in.Size = 50
+		}
 		userSql := fmt.Sprintf("SELECT   MAX( c.id ) as messageId   FROM  %s c   "+
 			"LEFT JOIN %s d ON   c.own_type=1 AND  c.own_id=d.id   "+
+			"LEFT JOIN %s b ON if (c.send_user_type=1 ,c.receive_user_id,c.send_user_id)=b.id  "+
 			"WHERE   c.own_type = 1    "+
-			"AND (d.customer_service_id = %d or d.customer_service_id =0 )   "+
+			"AND (%s)   "+
 			"AND ( c.type = 4 OR c.type = 5 or  c.type=6 or  c.type=7 )   "+
-			"  %s %s  "+
+			"  %s %s %s "+
 			"GROUP BY   (   CASE  WHEN  c.send_user_type =2 THEN  CONCAT( c.send_user_id )   WHEN c.send_user_type =1 THEN  CONCAT( c.receive_user_id )  END  ) ",
-			util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_CHAT_SESSION,
-			in.EntUserId, startTimeSql, endTimeSql)
-		data = util.Mysql.SelectBySql(userSql)
-		if data != nil {
-			customerMessageId := util.Inhandle(data)
+			util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_CHAT_SESSION, util.BASE_USER,
+			idSql, startTimeSql, endTimeSql, phoneSql)
+		countSql := fmt.Sprintf("SELECT * FROM (%s) as data  order by messageId desc ", userSql)
+		countData := util.Mysql.SelectBySql(countSql)
+		log.Println("查询最新消息数量sql:", countSql)
+		if countData != nil && len(*countData) > 0 {
+			log.Printf("查询耗时1:%d;查询数量:%d", time.Since(tm), count)
+			count = quitl.Int64All(len(*countData))
+			var d []map[string]interface{}
+			if in.Page*in.Size >= count {
+				d = (*countData)[(in.Page-1)*in.Size:]
+			} else {
+				d = (*countData)[(in.Page-1)*in.Size : in.Page*in.Size]
+			}
+			customerMessageId := util.Inhandle(&d)
 			//客服的用户列表
 			sqlStr = fmt.Sprintf("SELECT  "+
 				"(  CASE        WHEN SUBSTR( b.nickname, 1, 3 ) = 'JY_' THEN    CONCAT( SUBSTR( b.phone, 1, 3 ), '****', SUBSTR( b.phone, 8, 11 ) )     WHEN b.nickname = '' THEN    CONCAT( SUBSTR( b.phone, 1, 3 ), '****', SUBSTR( b.phone, 8, 11 ) ) ELSE b.nickname    END    )"+
@@ -181,7 +207,7 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 				"AND i.ent_id=f.ent_id "+
 				"AND  i.user_id=f.user_id    "+
 				"AND h.isread = 0    "+
-				"AND  (i.customer_service_id= %d or i.customer_service_id=0) ) AS number "+
+				"AND  i.customer_service_id= %d) AS number "+
 				"FROM  %s a  "+
 				"LEFT JOIN %s b ON if (a.send_user_type=1 ,a.receive_user_id,a.send_user_id)=b.id  "+
 				"LEFT JOIN %s e ON e.id = a.messag_id  "+
@@ -192,8 +218,12 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 		}
 	}
 	if sqlStr != "" {
-		log.Println(sqlStr)
+		log.Println("查询列表sql:", sqlStr)
 		data = util.Mysql.SelectBySql(sqlStr)
+		log.Println("查询耗时2:", time.Since(tm), count)
+		if in.UserType == 2 && data != nil && len(*data) > 0 {
+			count = quitl.Int64All(len(*data))
+		}
 	}
 	return
 }
@@ -631,11 +661,13 @@ func (b MessaggeService) UpdateReadById(in *messagecenter.ReadStateReq) bool {
 				pc_a, err := util.GetData(userType, userId)
 				if fool {
 					if err == nil && pc_a != nil {
-						//id一致
-						if in.MessageId == pc_a.Data["id"] {
-							util.SetData(userType, userId, map[string]interface{}{"data": map[string]interface{}{}, "count": pc_a.Count - 1}, util.SurvivalTime)
-						} else {
-							util.SetData(userType, userId, map[string]interface{}{"data": data, "count": pc_a.Count - 1}, util.SurvivalTime)
+						if pc_a.Count >= 1 {
+							//id一致
+							if in.MessageId == pc_a.Data["id"] {
+								util.SetData(userType, userId, map[string]interface{}{"data": map[string]interface{}{}, "count": pc_a.Count - 1}, util.SurvivalTime)
+							} else {
+								util.SetData(userType, userId, map[string]interface{}{"data": data, "count": pc_a.Count - 1}, util.SurvivalTime)
+							}
 						}
 					}
 				}
@@ -650,10 +682,26 @@ func (b MessaggeService) UpdateReadById(in *messagecenter.ReadStateReq) bool {
 // WithdrawMessage 撤回消息
 func (b MessaggeService) WithdrawMessage(in *messagecenter.ReadWithdrawReq) bool {
 	messageId := encrypt.SE.Decode4Hex(in.MessageId)
+	newUserId, entUserId := NewEndId(quitl.Int64All(messageId), in.UserType)
+	msg := util.Mysql.FindOne(util.SOCIALIZE_MESSAGE, map[string]interface{}{"id": messageId}, "create_time", "")
+	if msg == nil || len(*msg) <= 0 {
+		log.Println("查询消息id失败")
+		return false
+	}
+	createTime, _ := time.Parse(util.Date_Full_Layout, quitl.InterfaceToStr((*msg)["create_time"]))
+	if createTime.Unix()+60*2 < time.Now().Unix() {
+		log.Println("消息已超过2分钟,撤回失败")
+		return false
+	}
 	nowForm := time.Now().Local()
-
-	return util.Mysql.Update(util.SOCIALIZE_MESSAGE_MAILBOX,
-		map[string]interface{}{"id": messageId}, map[string]interface{}{"messag_id": messageId, "iswithdraw": 1, "withdraw_time": nowForm.Format(util.Date_Full_Layout)})
+	m := util.Mysql.Update(util.SOCIALIZE_MESSAGE_MAILBOX,
+		map[string]interface{}{"messag_id": messageId}, map[string]interface{}{"iswithdraw": 1, "withdraw_time": nowForm.Format(util.Date_Full_Layout)})
+	if m {
+		//消息撤回 更新对方私信
+		in.UserType = quitl.Int64All(quitl.If(in.UserType == 1, 2, 1))
+		b.Count(newUserId, in.UserType, entUserId, true)
+	}
+	return m
 }
 
 // AppraiseMessage 消息评价
@@ -685,3 +733,19 @@ func (b MessaggeService) AppraiseMessage(in *messagecenter.AppraiseReq) error {
 	}
 	return fmt.Errorf("评价消息异常")
 }
+
+// NewEndId 消息撤回 获取对方userid
+func NewEndId(messageId, iType int64) (newUserId, entUserId int64) {
+	data := util.Mysql.FindOne(util.SOCIALIZE_MESSAGE_MAILBOX, map[string]interface{}{"messag_id": messageId, "own_type": iType}, "", "")
+	if data != nil && len(*data) > 0 {
+		if iType == 1 { //客服撤回消息 获取客服id与用户id
+			entUserId = quitl.Int64All((*data)["send_user_id"])
+			newUserId = quitl.Int64All((*data)["receive_user_id"])
+		} else {
+			//用户撤回消息 获取客服id与用户id
+			newUserId = quitl.Int64All((*data)["send_user_id"])
+			entUserId = quitl.Int64All((*data)["receive_user_id"])
+		}
+	}
+	return
+}

+ 2 - 2
service/message_mail_box_test.go

@@ -90,7 +90,7 @@ func TestMessaggeService_Count(t *testing.T) {
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			b := MessaggeService{}
-			gotCount, gotLast, err := b.Count(tt.args.newUserId, tt.args.userType, tt.args.entUserId)
+			gotCount, gotLast, err := b.Count(tt.args.newUserId, tt.args.userType, tt.args.entUserId, true)
 			if (err != nil) != tt.wantErr {
 				t.Errorf("Count() error = %v, wantErr %v", err, tt.wantErr)
 				return
@@ -591,7 +591,7 @@ func TestMessaggeService_UserList(t *testing.T) {
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			b := MessaggeService{}
-			gotData, err := b.UserList(tt.args.in)
+			gotData, _, err := b.UserList(tt.args.in)
 			if (err != nil) != tt.wantErr {
 				t.Errorf("UserList() error = %v, wantErr %v", err, tt.wantErr)
 				return