From 732fe143199eda9f67712cf9ebf4414a5686da34 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 17 Oct 2022 17:58:50 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E7=8E=A9=E5=AE=B6=E7=9A=84=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=B7=A8=E6=9C=8D=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_msgdistrib.json | 6 + modules/hero/api_awaken.go | 6 - modules/hero/api_info.go | 24 ++- modules/pagoda/api_getlist.go | 4 +- pb/hero_msg.pb.go | 310 ++++++++++++++++++---------------- pb/serverdata.pb.go | 182 ++++++++++++++++++++ pb/user_db.pb.go | 8 +- 7 files changed, 365 insertions(+), 175 deletions(-) create mode 100644 pb/serverdata.pb.go diff --git a/bin/json/game_msgdistrib.json b/bin/json/game_msgdistrib.json index 5341d1d15..6ee5e9cd6 100644 --- a/bin/json/game_msgdistrib.json +++ b/bin/json/game_msgdistrib.json @@ -40,5 +40,11 @@ "open": false, "routrules": "~/worker", "describe": "月之秘境" + }, + { + "msgid": "hero.info", + "open": true, + "routrules": "~/worker", + "describe": "查询英雄详细" } ] \ No newline at end of file diff --git a/modules/hero/api_awaken.go b/modules/hero/api_awaken.go index 60d3ec8f8..e7ad61e5d 100644 --- a/modules/hero/api_awaken.go +++ b/modules/hero/api_awaken.go @@ -44,12 +44,6 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c code = pb.ErrorCode_ConfigNoFound return } - // nextAwaken := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1) - // if nextAwaken == nil { - // code = pb.ErrorCode_HeroMaxAwaken // 达到最大觉醒等级 - // return - // } - if len(awakenData.Phasebonus) < 2 { // 配置校验 code = pb.ErrorCode_ConfigNoFound return diff --git a/modules/hero/api_info.go b/modules/hero/api_info.go index 2d998e893..579c17b88 100644 --- a/modules/hero/api_info.go +++ b/modules/hero/api_info.go @@ -1,7 +1,6 @@ package hero import ( - "fmt" "go_dreamfactory/comm" "go_dreamfactory/pb" @@ -17,28 +16,25 @@ func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.HeroInfoReq) ( } func (this *apiComp) Info(session comm.IUserSession, req *pb.HeroInfoReq) (code pb.ErrorCode, data proto.Message) { + var ( + uid string + ) if code = this.InfoCheck(session, req); code != pb.ErrorCode_Success { return } - rsp := &pb.HeroInfoResp{} - defer func() { - err := session.SendMsg(string(this.module.GetType()), HeroSubTypeInfo, rsp) - if err != nil { - code = pb.ErrorCode_SystemError - return - } - // utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), HeroSubTypeInfo, req, rsp) - }() - hero := this.module.modelHero.getOneHero(session.GetUserId(), req.HeroId) + if req.Uid == "" { + uid = session.GetUserId() + } else { + uid = req.Uid + } + hero := this.module.modelHero.getOneHero(uid, req.HeroId) if hero == nil { code = pb.ErrorCode_HeroNoExist return } - rsp.Base = hero - - fmt.Printf("[ %v ] \n", hero) + session.SendMsg(string(this.module.GetType()), HeroSubTypeInfo, rsp) return } diff --git a/modules/pagoda/api_getlist.go b/modules/pagoda/api_getlist.go index 442967850..c5d8e24a6 100644 --- a/modules/pagoda/api_getlist.go +++ b/modules/pagoda/api_getlist.go @@ -37,7 +37,9 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PagodaGetListReq } } else { season, _ := this.module.modelSeasonPagoda.getSeasonPagodaList(session.GetUserId()) - if season != nil { + if season == nil { // 创建一条新的数据 + + } else { list.PagodaId = season.PagodaId list.Type = season.Type list.Reward = season.Reward diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index 459625d3b..08ee85157 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -27,6 +27,7 @@ type HeroInfoReq struct { unknownFields protoimpl.UnknownFields HeroId string `protobuf:"bytes,1,opt,name=heroId,proto3" json:"heroId"` //英雄唯一ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` // uid 查自己不传也可以 } func (x *HeroInfoReq) Reset() { @@ -68,6 +69,13 @@ func (x *HeroInfoReq) GetHeroId() string { return "" } +func (x *HeroInfoReq) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + type HeroInfoResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1785,162 +1793,164 @@ var File_hero_hero_msg_proto protoreflect.FileDescriptor var file_hero_hero_msg_proto_rawDesc = []byte{ 0x0a, 0x13, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, - 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x25, 0x0a, 0x0b, 0x48, 0x65, 0x72, + 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x37, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, - 0x22, 0x2b, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x1b, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, - 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x22, 0x0d, 0x0a, - 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x2b, 0x0a, 0x0c, - 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, - 0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x08, 0x49, 0x74, 0x65, - 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x62, 0x0a, 0x15, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, - 0x6e, 0x55, 0x70, 0x6c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, - 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, - 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x2b, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x43, 0x61, 0x72, - 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4d, 0x61, 0x70, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x08, 0x65, 0x78, 0x70, 0x43, 0x61, - 0x72, 0x64, 0x73, 0x22, 0x35, 0x0a, 0x16, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x6c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, - 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, - 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x48, 0x0a, 0x0c, 0x43, 0x6f, - 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, - 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x71, - 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x21, - 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, - 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, - 0x6f, 0x12, 0x29, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x52, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x52, 0x61, 0x63, 0x65, 0x22, 0x37, 0x0a, 0x18, - 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, - 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, - 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x5a, 0x0a, 0x18, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x22, + 0x0d, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x2b, + 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, + 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, + 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x08, 0x49, + 0x74, 0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x62, 0x0a, 0x15, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x65, 0x6e, 0x55, 0x70, 0x6c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, + 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, + 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x2b, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x43, + 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4d, 0x61, 0x70, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x08, 0x65, 0x78, 0x70, + 0x43, 0x61, 0x72, 0x64, 0x73, 0x22, 0x35, 0x0a, 0x16, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x6c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, + 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x48, 0x0a, 0x0c, + 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, + 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x53, + 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x74, 0x61, 0x72, 0x52, + 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, + 0x12, 0x21, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, + 0x65, 0x72, 0x6f, 0x12, 0x29, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x52, 0x61, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x52, 0x61, 0x63, 0x65, 0x22, 0x37, + 0x0a, 0x18, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, + 0x55, 0x70, 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, + 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, + 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x5a, 0x0a, 0x18, 0x48, 0x65, 0x72, 0x6f, 0x53, + 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, + 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, + 0x4f, 0x62, 0x6a, 0x22, 0x38, 0x0a, 0x19, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, + 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4e, 0x0a, + 0x10, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, - 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, - 0x6a, 0x22, 0x38, 0x0a, 0x19, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, - 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, - 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4e, 0x0a, 0x10, 0x48, - 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x12, - 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, - 0x09, 0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x71, 0x0a, 0x11, 0x48, - 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, - 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, - 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x27, 0x0a, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, - 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, - 0x72, 0x6f, 0x52, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x22, 0x35, - 0x0a, 0x15, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, - 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, - 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x4d, 0x0a, 0x16, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, - 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, - 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, - 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, - 0x65, 0x72, 0x67, 0x79, 0x22, 0x44, 0x0a, 0x0a, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, - 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x5e, 0x0a, 0x19, 0x48, 0x65, - 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x73, 0x65, 0x45, 0x6e, - 0x65, 0x72, 0x67, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, - 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, - 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x23, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x39, 0x0a, 0x1a, 0x48, 0x65, - 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x73, 0x65, 0x45, 0x6e, - 0x65, 0x72, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, + 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x71, 0x0a, + 0x11, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, + 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x27, 0x0a, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, + 0x72, 0x43, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, + 0x48, 0x65, 0x72, 0x6f, 0x52, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, + 0x22, 0x35, 0x0a, 0x15, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, + 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, + 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x4d, 0x0a, 0x16, 0x48, 0x65, 0x72, 0x6f, 0x52, + 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, + 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x44, 0x0a, 0x0a, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, + 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x5e, 0x0a, 0x19, + 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x73, 0x65, + 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, + 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, + 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x23, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, + 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x39, 0x0a, 0x1a, + 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x73, 0x65, + 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, + 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, + 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x2d, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, + 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, + 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, + 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x77, + 0x61, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, - 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x2d, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x77, 0x61, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, - 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, - 0x62, 0x6a, 0x49, 0x44, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x77, 0x61, 0x6b, - 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, - 0x65, 0x72, 0x6f, 0x22, 0xaa, 0x02, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, - 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x44, 0x0a, - 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x25, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, + 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0xaa, 0x02, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, + 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, + 0x44, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x25, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x0c, 0x48, 0x65, 0x72, + 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, + 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x77, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x47, 0x65, + 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, + 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x44, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, + 0x67, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, + 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, + 0x33, 0x0a, 0x14, 0x48, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, - 0x68, 0x65, 0x72, 0x6f, 0x22, 0x77, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x0d, 0x68, - 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, 0x67, 0x49, - 0x44, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x33, 0x0a, - 0x14, 0x48, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, - 0x72, 0x6f, 0x22, 0x4b, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x72, 0x61, 0x77, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x2a, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x22, 0x2d, 0x0a, 0x0e, 0x48, - 0x65, 0x72, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, - 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, - 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x48, 0x65, - 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, - 0x65, 0x71, 0x22, 0x43, 0x0a, 0x15, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, - 0x72, 0x64, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x34, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x34, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x22, 0x94, 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, - 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x75, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x75, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x68, - 0x65, 0x72, 0x6f, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x10, - 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4b, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, + 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x72, 0x61, 0x77, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x2a, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x22, 0x2d, 0x0a, + 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, + 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, + 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, + 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x46, 0x6c, 0x6f, 0x6f, + 0x72, 0x52, 0x65, 0x71, 0x22, 0x43, 0x0a, 0x15, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, + 0x43, 0x61, 0x72, 0x64, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x34, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x34, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x22, 0x94, 0x01, 0x0a, 0x0d, 0x48, 0x65, + 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, + 0x75, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x75, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x05, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x10, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pb/serverdata.pb.go b/pb/serverdata.pb.go new file mode 100644 index 000000000..874bdaa1a --- /dev/null +++ b/pb/serverdata.pb.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: serverdata.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +//服务器数据 +type DBServerData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //主键id + ServerState int32 `protobuf:"varint,2,opt,name=serverState,proto3" json:"serverState" bson:"serverState"` //服务器状态 + DisposableLoop int32 `protobuf:"varint,3,opt,name=disposableLoop,proto3" json:"disposableLoop" bson:"disposableLoop"` //一次性调用的塔数据索引 // + FixedLoop int32 `protobuf:"varint,4,opt,name=fixedLoop,proto3" json:"fixedLoop" bson:"fixedLoop"` //赛季塔循环调用索引 + OpenTime int64 `protobuf:"varint,5,opt,name=openTime,proto3" json:"openTime" bson:"openTime"` //开服时间 +} + +func (x *DBServerData) Reset() { + *x = DBServerData{} + if protoimpl.UnsafeEnabled { + mi := &file_serverdata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBServerData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBServerData) ProtoMessage() {} + +func (x *DBServerData) ProtoReflect() protoreflect.Message { + mi := &file_serverdata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBServerData.ProtoReflect.Descriptor instead. +func (*DBServerData) Descriptor() ([]byte, []int) { + return file_serverdata_proto_rawDescGZIP(), []int{0} +} + +func (x *DBServerData) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBServerData) GetServerState() int32 { + if x != nil { + return x.ServerState + } + return 0 +} + +func (x *DBServerData) GetDisposableLoop() int32 { + if x != nil { + return x.DisposableLoop + } + return 0 +} + +func (x *DBServerData) GetFixedLoop() int32 { + if x != nil { + return x.FixedLoop + } + return 0 +} + +func (x *DBServerData) GetOpenTime() int64 { + if x != nil { + return x.OpenTime + } + return 0 +} + +var File_serverdata_proto protoreflect.FileDescriptor + +var file_serverdata_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x64, + 0x69, 0x73, 0x70, 0x6f, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x12, 0x1c, 0x0a, + 0x09, 0x66, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x66, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x6f, + 0x70, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, + 0x70, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_serverdata_proto_rawDescOnce sync.Once + file_serverdata_proto_rawDescData = file_serverdata_proto_rawDesc +) + +func file_serverdata_proto_rawDescGZIP() []byte { + file_serverdata_proto_rawDescOnce.Do(func() { + file_serverdata_proto_rawDescData = protoimpl.X.CompressGZIP(file_serverdata_proto_rawDescData) + }) + return file_serverdata_proto_rawDescData +} + +var file_serverdata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_serverdata_proto_goTypes = []interface{}{ + (*DBServerData)(nil), // 0: DBServerData +} +var file_serverdata_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_serverdata_proto_init() } +func file_serverdata_proto_init() { + if File_serverdata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_serverdata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBServerData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_serverdata_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_serverdata_proto_goTypes, + DependencyIndexes: file_serverdata_proto_depIdxs, + MessageInfos: file_serverdata_proto_msgTypes, + }.Build() + File_serverdata_proto = out.File + file_serverdata_proto_rawDesc = nil + file_serverdata_proto_goTypes = nil + file_serverdata_proto_depIdxs = nil +} diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index 7c1df9e67..def3b0c33 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -124,7 +124,7 @@ type DBUser struct { Title int32 `protobuf:"varint,19,opt,name=title,proto3" json:"title"` //@go_tags(`bson:"title"`)头衔 Offlinetime int64 `protobuf:"varint,11,opt,name=offlinetime,proto3" json:"offlinetime" bson:"offlinetime"` //离线时间 Figure int32 `protobuf:"varint,20,opt,name=figure,proto3" json:"figure" bson:"figure"` //主角形象 - Bgp int32 `protobuf:"varint,21,opt,name=bgp,proto3" json:"bgp" bson:"bgp"` //背景 + Bgp string `protobuf:"bytes,21,opt,name=bgp,proto3" json:"bgp" bson:"bgp"` //背景 } func (x *DBUser) Reset() { @@ -299,11 +299,11 @@ func (x *DBUser) GetFigure() int32 { return 0 } -func (x *DBUser) GetBgp() int32 { +func (x *DBUser) GetBgp() string { if x != nil { return x.Bgp } - return 0 + return "" } type DBUserSetting struct { @@ -493,7 +493,7 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x52, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x67, 0x70, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x62, 0x67, 0x70, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, + 0x28, 0x09, 0x52, 0x03, 0x62, 0x67, 0x70, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x75, 0x61, From 9431b19d2ecd21dd056f8c29c87371f6ad1971a1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 17 Oct 2022 18:34:29 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=B7=A8=E6=9C=8Did=20?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/modulebase.go | 5 +++++ sys/db/core.go | 6 ++++++ sys/db/db.go | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/modules/modulebase.go b/modules/modulebase.go index e78508bb2..79b3c865a 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -104,6 +104,11 @@ func (this *ModuleBase) Start() (err error) { return } +//获取跨服标签 +func (this *ModuleBase) GetCrossTag() string { + return db.CrossTag() +} + func (this *ModuleBase) GetUserSession(uid string) (session comm.IUserSession, ok bool) { var udata *pb.CacheUser if udata = this.ModuleUser.GetUserSession(uid); udata == nil { diff --git a/sys/db/core.go b/sys/db/core.go index e1d1693fb..eaa05e377 100644 --- a/sys/db/core.go +++ b/sys/db/core.go @@ -8,6 +8,8 @@ type ( ISys interface { //本服数据连接 Local() (conn *DBConn, err error) + //跨服区服id + CrossTag() string //本服数据连接 Cross() (conn *DBConn, err error) //跨服列表数据层连接 @@ -51,6 +53,10 @@ func Local() (conn *DBConn, err error) { return defsys.Local() } +func CrossTag() string { + return defsys.CrossTag() +} + func Cross() (conn *DBConn, err error) { return defsys.Cross() } diff --git a/sys/db/db.go b/sys/db/db.go index 99fa32287..6946aedaa 100644 --- a/sys/db/db.go +++ b/sys/db/db.go @@ -107,6 +107,10 @@ func (this *DB) Local() (conn *DBConn, err error) { return } +func (this *DB) CrossTag() string { + return this.options.CrossTag +} + func (this *DB) Cross() (conn *DBConn, err error) { conn = this.cross if conn == nil { From f3c8c8f52ced03bf74e6dba5c903a25c9233c08b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 17 Oct 2022 19:52:41 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=B8=85=E7=90=86=E8=B5=9B=E5=AD=A3?= =?UTF-8?q?=E5=A1=94=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pagoda/api_getlist.go | 6 + modules/pagoda/comp_configure.go | 25 ++++ modules/pagoda/module.go | 16 +++ pb/hero_msg.pb.go | 210 ++++++++++++++++++++++++++----- 4 files changed, 228 insertions(+), 29 deletions(-) diff --git a/modules/pagoda/api_getlist.go b/modules/pagoda/api_getlist.go index c5d8e24a6..671123148 100644 --- a/modules/pagoda/api_getlist.go +++ b/modules/pagoda/api_getlist.go @@ -38,7 +38,13 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PagodaGetListReq } else { season, _ := this.module.modelSeasonPagoda.getSeasonPagodaList(session.GetUserId()) if season == nil { // 创建一条新的数据 + seasonPagoda := &pb.DBSeasonPagoda{} + seasonPagoda.Id = primitive.NewObjectID().Hex() + seasonPagoda.Uid = session.GetUserId() + seasonPagoda.PagodaId = 0 // 初始数据0层 + seasonPagoda.Type = 201 // TODO 新的塔数据根据配置文件获取 + this.module.modelSeasonPagoda.addNewSeasonPagoda(session.GetUserId(), seasonPagoda) } else { list.PagodaId = season.PagodaId list.Type = season.Type diff --git a/modules/pagoda/comp_configure.go b/modules/pagoda/comp_configure.go index 29dd99a00..e27d436a5 100644 --- a/modules/pagoda/comp_configure.go +++ b/modules/pagoda/comp_configure.go @@ -93,3 +93,28 @@ func (this *configureComp) GetPagodaRewardconfig(id int32) (data *cfg.GamePagoda } return } + +// 获取某类型塔层数 +func (this *configureComp) GetPagodaFloor(PagodaType int32) int32 { + var maxFloor int32 + if v, err := this.GetConfigure(game_pagoda); err == nil { + var ( + configure *cfg.GamePagoda + ok bool + ) + if configure, ok = v.(*cfg.GamePagoda); !ok { + log.Errorf("%T no is *cfg.Game_pagodaData", v) + return 0 + } + for _, value := range configure.GetDataList() { + if value.PagodaType == PagodaType { + maxFloor++ + } + } + + } else { + log.Errorf("get game_pagodataskreward conf err:%v", err) + return 0 + } + return maxFloor +} diff --git a/modules/pagoda/module.go b/modules/pagoda/module.go index 630bebf14..adc46ee79 100644 --- a/modules/pagoda/module.go +++ b/modules/pagoda/module.go @@ -1,8 +1,10 @@ package pagoda import ( + "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" ) @@ -92,3 +94,17 @@ func (this *Pagoda) CheckUserBasePagodaInfo(uid string) (data *pb.DBPagodaRecord } return } + +// 清除赛季塔信息 +func (this *Pagoda) CleanSeasonPagodaData() (code pb.ErrorCode) { + seasonMaxCount := this.modelPagoda.module.configure.GetPagodaFloor(201) + + for iPos := 0; iPos < int(seasonMaxCount); iPos++ { + key := fmt.Sprintf("%s-%d-rank", floorRankKey, iPos+1) + if err := this.modelSeasonPagoda.Redis.Ltrim(key, 0, -1); err != nil { + log.Errorf("delete failed") + } + } + + return +} diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index 08ee85157..081350c8e 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -1788,6 +1788,118 @@ func (*HeroFusionResp) Descriptor() ([]byte, []int) { return file_hero_hero_msg_proto_rawDescGZIP(), []int{33} } +// 升星精灵升级 +type HeroSpriteStarReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID + Hero []*CostCardData `protobuf:"bytes,2,rep,name=hero,proto3" json:"hero"` // 消耗卡牌对象ID + HeroRace []*CostCardData `protobuf:"bytes,3,rep,name=heroRace,proto3" json:"heroRace"` // 消耗种族卡牌对象ID +} + +func (x *HeroSpriteStarReq) Reset() { + *x = HeroSpriteStarReq{} + if protoimpl.UnsafeEnabled { + mi := &file_hero_hero_msg_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeroSpriteStarReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeroSpriteStarReq) ProtoMessage() {} + +func (x *HeroSpriteStarReq) ProtoReflect() protoreflect.Message { + mi := &file_hero_hero_msg_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeroSpriteStarReq.ProtoReflect.Descriptor instead. +func (*HeroSpriteStarReq) Descriptor() ([]byte, []int) { + return file_hero_hero_msg_proto_rawDescGZIP(), []int{34} +} + +func (x *HeroSpriteStarReq) GetHeroObjID() string { + if x != nil { + return x.HeroObjID + } + return "" +} + +func (x *HeroSpriteStarReq) GetHero() []*CostCardData { + if x != nil { + return x.Hero + } + return nil +} + +func (x *HeroSpriteStarReq) GetHeroRace() []*CostCardData { + if x != nil { + return x.HeroRace + } + return nil +} + +// 卡牌升星返回 +type HeroSpriteStarResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hero *DBHero `protobuf:"bytes,1,opt,name=hero,proto3" json:"hero"` // 英雄对象 +} + +func (x *HeroSpriteStarResp) Reset() { + *x = HeroSpriteStarResp{} + if protoimpl.UnsafeEnabled { + mi := &file_hero_hero_msg_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeroSpriteStarResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeroSpriteStarResp) ProtoMessage() {} + +func (x *HeroSpriteStarResp) ProtoReflect() protoreflect.Message { + mi := &file_hero_hero_msg_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeroSpriteStarResp.ProtoReflect.Descriptor instead. +func (*HeroSpriteStarResp) Descriptor() ([]byte, []int) { + return file_hero_hero_msg_proto_rawDescGZIP(), []int{35} +} + +func (x *HeroSpriteStarResp) GetHero() *DBHero { + if x != nil { + return x.Hero + } + return nil +} + var File_hero_hero_msg_proto protoreflect.FileDescriptor var file_hero_hero_msg_proto_rawDesc = []byte{ @@ -1949,8 +2061,19 @@ var file_hero_hero_msg_proto_rawDesc = []byte{ 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x10, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x70, 0x22, 0x7f, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x70, 0x72, 0x69, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, + 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, + 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x21, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x29, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, + 0x52, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x73, + 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x52, + 0x61, 0x63, 0x65, 0x22, 0x31, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x70, 0x72, 0x69, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, + 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1965,7 +2088,7 @@ func file_hero_hero_msg_proto_rawDescGZIP() []byte { return file_hero_hero_msg_proto_rawDescData } -var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 39) var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroInfoReq)(nil), // 0: HeroInfoReq (*HeroInfoResp)(nil), // 1: HeroInfoResp @@ -2001,37 +2124,42 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroDrawCardFloorResp)(nil), // 31: HeroDrawCardFloorResp (*HeroFusionReq)(nil), // 32: HeroFusionReq (*HeroFusionResp)(nil), // 33: HeroFusionResp - nil, // 34: HeroPropertyPush.PropertyEntry - nil, // 35: HeroPropertyPush.AddPropertyEntry - nil, // 36: HeroFusionReq.HerosEntry - (*DBHero)(nil), // 37: DBHero + (*HeroSpriteStarReq)(nil), // 34: HeroSpriteStarReq + (*HeroSpriteStarResp)(nil), // 35: HeroSpriteStarResp + nil, // 36: HeroPropertyPush.PropertyEntry + nil, // 37: HeroPropertyPush.AddPropertyEntry + nil, // 38: HeroFusionReq.HerosEntry + (*DBHero)(nil), // 39: DBHero } var file_hero_hero_msg_proto_depIdxs = []int32{ - 37, // 0: HeroInfoResp.base:type_name -> DBHero - 37, // 1: HeroListResp.list:type_name -> DBHero + 39, // 0: HeroInfoResp.base:type_name -> DBHero + 39, // 1: HeroListResp.list:type_name -> DBHero 5, // 2: HeroStrengthenUplvReq.expCards:type_name -> MapStringInt32 - 37, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero + 39, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero 8, // 4: HeroStrengthenUpStarReq.hero:type_name -> CostCardData 8, // 5: HeroStrengthenUpStarReq.heroRace:type_name -> CostCardData - 37, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero - 37, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero - 37, // 8: HeroResonanceResp.hero:type_name -> DBHero - 37, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero - 37, // 10: HeroResonanceResetResp.hero:type_name -> DBHero + 39, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero + 39, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero + 39, // 8: HeroResonanceResp.hero:type_name -> DBHero + 39, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero + 39, // 10: HeroResonanceResetResp.hero:type_name -> DBHero 17, // 11: HeroResonanceUseEnergyReq.energy:type_name -> EnergyData - 37, // 12: HeroResonanceUseEnergyResp.hero:type_name -> DBHero - 37, // 13: HeroAwakenResp.hero:type_name -> DBHero - 34, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry - 35, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry - 37, // 16: HeroLockResp.hero:type_name -> DBHero - 37, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero - 37, // 18: HeroChangePush.list:type_name -> DBHero - 36, // 19: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 39, // 12: HeroResonanceUseEnergyResp.hero:type_name -> DBHero + 39, // 13: HeroAwakenResp.hero:type_name -> DBHero + 36, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry + 37, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry + 39, // 16: HeroLockResp.hero:type_name -> DBHero + 39, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero + 39, // 18: HeroChangePush.list:type_name -> DBHero + 38, // 19: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry + 8, // 20: HeroSpriteStarReq.hero:type_name -> CostCardData + 8, // 21: HeroSpriteStarReq.heroRace:type_name -> CostCardData + 39, // 22: HeroSpriteStarResp.hero:type_name -> DBHero + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_hero_hero_msg_proto_init() } @@ -2449,6 +2577,30 @@ func file_hero_hero_msg_proto_init() { return nil } } + file_hero_hero_msg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeroSpriteStarReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hero_hero_msg_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeroSpriteStarResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2456,7 +2608,7 @@ func file_hero_hero_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hero_hero_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 37, + NumMessages: 39, NumExtensions: 0, NumServices: 0, }, From 85bb6f5391ec0b842a8ba98087607173dd80b77b Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Mon, 17 Oct 2022 18:33:28 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E8=B7=A8=E6=9C=8D=E6=9F=A5=E5=A5=BD?= =?UTF-8?q?=E5=8F=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 2 + comm/imodule.go | 2 + modules/friend/api_randlist.go | 2 +- modules/friend/module.go | 1 - modules/user/api_login.go | 16 +--- modules/user/model_cross_session.go | 2 - modules/user/model_session.go | 19 ++++ modules/user/module.go | 29 ++++++ pb/comm.pb.go | 136 ++++++++++++++++++++++++---- pb/user_msg.pb.go | 125 +++++++++++++++++++------ 10 files changed, 272 insertions(+), 62 deletions(-) delete mode 100644 modules/user/model_cross_session.go diff --git a/comm/const.go b/comm/const.go index d4aedaa91..177ec6bef 100644 --- a/comm/const.go +++ b/comm/const.go @@ -143,6 +143,8 @@ const ( TableLibrary = "library" TableFetter = "herofetter" + + TableCrossSession = "crosssession" ) //RPC服务接口定义处 diff --git a/comm/imodule.go b/comm/imodule.go index 3d7066158..bb2097ee2 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -85,6 +85,8 @@ type ( ChangeUserExpand(uid string, value map[string]interface{}) error // 本服在线玩家列表 UserOnlineList() ([]*pb.CacheUser, error) + // 跨服在线玩家列表 + CrossUserOnlineList() ([]*pb.CacheUser, error) } //武器模块 IEquipment interface { diff --git a/modules/friend/api_randlist.go b/modules/friend/api_randlist.go index 150902df3..5c0c26b99 100644 --- a/modules/friend/api_randlist.go +++ b/modules/friend/api_randlist.go @@ -22,7 +22,7 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR } //在线玩家列表 - cuList, err := this.moduleFriend.ModuleUser.UserOnlineList() + cuList, err := this.moduleFriend.ModuleUser.CrossUserOnlineList() if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/friend/module.go b/modules/friend/module.go index c06d891e3..c57338819 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -30,7 +30,6 @@ func (this *Friend) GetType() core.M_Modules { func (this *Friend) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) - return } diff --git a/modules/user/api_login.go b/modules/user/api_login.go index a603bb1a0..cc5770f23 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -4,7 +4,6 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/sys/log" "go_dreamfactory/pb" - "go_dreamfactory/sys/db" "go_dreamfactory/utils" "time" @@ -30,7 +29,6 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod user *pb.DBUser ) - // t := time.Now() rsp := &pb.UserLoginResp{} defer func() { if user != nil && code == pb.ErrorCode_Success { @@ -41,7 +39,6 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod code = pb.ErrorCode_SystemError return } - // log.Debugf("登录耗时:%v", time.Since(t)) } }() @@ -84,21 +81,16 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod //bind user err = session.Bind(user.Uid, this.service.GetId()) if err != nil { - this.module.Errorf("err:%v", err) + this.module.Errorf("user bind err:%v", err) code = pb.ErrorCode_BindUser return } //缓存user session - err = this.module.modelSession.AddList(comm.RDS_SESSION, user.Uid, map[string]interface{}{ - "uid": user.Uid, - "sessionId": session.GetSessionId(), - "serviceTag": session.GetServiecTag(), - "gatewayServiceId": session.GetGatewayServiceId(), - "ip": session.GetIP(), - }, db.SetDBMgoLog(false)) + err = this.module.modelSession.setUserSession(user.Uid, session) if err != nil { - code = pb.ErrorCode_DBError + this.module.Errorf("set user session err:%v", err) + code = pb.ErrorCode_UserSessionNobeing return } diff --git a/modules/user/model_cross_session.go b/modules/user/model_cross_session.go deleted file mode 100644 index cb301e23e..000000000 --- a/modules/user/model_cross_session.go +++ /dev/null @@ -1,2 +0,0 @@ -package user - diff --git a/modules/user/model_session.go b/modules/user/model_session.go index fc505f6e5..b456fe138 100644 --- a/modules/user/model_session.go +++ b/modules/user/model_session.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" + "go_dreamfactory/sys/db" ) type ModelSession struct { @@ -32,6 +33,24 @@ func (this *ModelSession) getUserSession(uid string) (user *pb.CacheUser) { return user } +//设置用户session +func (this *ModelSession) setUserSession(uid string, session comm.IUserSession) (err error) { + if err = this.AddList(comm.RDS_SESSION, uid, map[string]interface{}{ + "uid": uid, + "sessionId": session.GetSessionId(), + "serviceTag": session.GetServiecTag(), + "gatewayServiceId": session.GetGatewayServiceId(), + "ip": session.GetIP(), + }, db.SetDBMgoLog(false)); err != nil { + log.Debugf("setUserSession err:%v", err) + return + } + + // this.module.service.AcrossClusterRpcGo(context.TODO(), + // this.module.service.GetTag(), comm.Service_Worker, serviceMethod string, args interface{}, reply interface{}) + return +} + // 启动时清理session func (this *ModelSession) clean() { keys, err := this.Redis.Keys("session:*") diff --git a/modules/user/module.go b/modules/user/module.go index 514ca63b4..d9a26f6b1 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -1,6 +1,7 @@ package user import ( + "context" "fmt" "go_dreamfactory/comm" "go_dreamfactory/modules" @@ -15,6 +16,10 @@ import ( "github.com/pkg/errors" ) +const ( + Rpc_GetAllOnlineUser string = "Rpc_GetAllOnlineUser" +) + var _ comm.IUser = (*User)(nil) func NewModule() core.IModule { @@ -46,6 +51,7 @@ func (this *User) Init(service core.IService, module core.IModule, options core. func (this *User) Start() (err error) { err = this.ModuleBase.Start() event.RegisterGO(comm.EventUserOffline, this.CleanSession) + this.service.RegisterFunctionName(Rpc_GetAllOnlineUser, this.GetAllOnlineUser) return } @@ -92,6 +98,14 @@ func (this *User) UserOnlineList() ([]*pb.CacheUser, error) { return cache, nil } +// 跨服玩家列表 +func (this *User) CrossUserOnlineList() ([]*pb.CacheUser, error) { + reply := &pb.UserOnlineResp{} + err := this.service.AcrossClusterRpcCall(context.Background(), this.service.GetTag(), + comm.Service_Worker, Rpc_GetAllOnlineUser, nil, reply) + return reply.Users, err +} + //查询用户属性值 例如 金币 经验 func (this *User) QueryAttributeValue(uid string, attr string) (value int64) { user := this.modelUser.GetUser(uid) @@ -260,3 +274,18 @@ func (this *User) GetUserExpand(uid string) (result *pb.DBUserExpand, err error) func (this *User) ChangeUserExpand(uid string, value map[string]interface{}) error { return this.modelExpand.ChangeUserExpand(uid, value) } + +func (this *User) GetAllOnlineUser(ctx context.Context, args *pb.EmptyReq, reply *pb.UserOnlineResp) error { + conn, err := db.Cross() + if err != nil { + log.Errorf("cross db err: %v", err) + return err + } + model := db.NewDBModel(comm.TableSession, 0, conn) + var cache []*pb.CacheUser + if err := model.GetList(comm.RDS_SESSION, &cache); err != nil { + return err + } + reply.Users = cache + return nil +} diff --git a/pb/comm.pb.go b/pb/comm.pb.go index 63e26ac16..e83278621 100644 --- a/pb/comm.pb.go +++ b/pb/comm.pb.go @@ -1020,6 +1020,82 @@ func (x *RtaskParam) GetParam3() int32 { return 0 } +type EmptyReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyReq) Reset() { + *x = EmptyReq{} + if protoimpl.UnsafeEnabled { + mi := &file_comm_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyReq) ProtoMessage() {} + +func (x *EmptyReq) ProtoReflect() protoreflect.Message { + mi := &file_comm_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead. +func (*EmptyReq) Descriptor() ([]byte, []int) { + return file_comm_proto_rawDescGZIP(), []int{14} +} + +type EmptyResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyResp) Reset() { + *x = EmptyResp{} + if protoimpl.UnsafeEnabled { + mi := &file_comm_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyResp) ProtoMessage() {} + +func (x *EmptyResp) ProtoReflect() protoreflect.Message { + mi := &file_comm_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead. +func (*EmptyResp) Descriptor() ([]byte, []int) { + return file_comm_proto_rawDescGZIP(), []int{15} +} + var File_comm_proto protoreflect.FileDescriptor var file_comm_proto_rawDesc = []byte{ @@ -1134,12 +1210,14 @@ var file_comm_proto_rawDesc = []byte{ 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x33, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x48, - 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, - 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10, 0x03, - 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x2a, 0x43, + 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, + 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, + 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, + 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1155,7 +1233,7 @@ func file_comm_proto_rawDescGZIP() []byte { } var file_comm_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_comm_proto_goTypes = []interface{}{ (HeroAttributesType)(0), // 0: HeroAttributesType (*UserMessage)(nil), // 1: UserMessage @@ -1172,18 +1250,20 @@ var file_comm_proto_goTypes = []interface{}{ (*UserAssets)(nil), // 12: UserAssets (*TaskParam)(nil), // 13: TaskParam (*RtaskParam)(nil), // 14: RtaskParam - (*anypb.Any)(nil), // 15: google.protobuf.Any - (ErrorCode)(0), // 16: ErrorCode + (*EmptyReq)(nil), // 15: EmptyReq + (*EmptyResp)(nil), // 16: EmptyResp + (*anypb.Any)(nil), // 17: google.protobuf.Any + (ErrorCode)(0), // 18: ErrorCode } var file_comm_proto_depIdxs = []int32{ - 15, // 0: UserMessage.data:type_name -> google.protobuf.Any - 15, // 1: AgentMessage.Message:type_name -> google.protobuf.Any - 16, // 2: RPCMessageReply.Code:type_name -> ErrorCode - 15, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any + 17, // 0: UserMessage.data:type_name -> google.protobuf.Any + 17, // 1: AgentMessage.Message:type_name -> google.protobuf.Any + 18, // 2: RPCMessageReply.Code:type_name -> ErrorCode + 17, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any 1, // 4: RPCMessageReply.Reply:type_name -> UserMessage 1, // 5: AgentSendMessageReq.Reply:type_name -> UserMessage - 15, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any - 15, // 7: BroadCastMessageReq.Data:type_name -> google.protobuf.Any + 17, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any + 17, // 7: BroadCastMessageReq.Data:type_name -> google.protobuf.Any 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -1366,6 +1446,30 @@ func file_comm_proto_init() { return nil } } + file_comm_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_comm_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1373,7 +1477,7 @@ func file_comm_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_comm_proto_rawDesc, NumEnums: 1, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/user_msg.pb.go b/pb/user_msg.pb.go index 10081ed9f..328029025 100644 --- a/pb/user_msg.pb.go +++ b/pb/user_msg.pb.go @@ -1970,6 +1970,54 @@ func (x *UserShowteamResp) GetHeroObjIds() []string { return nil } +// 全服在线玩家列表 +type UserOnlineResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Users []*CacheUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users"` +} + +func (x *UserOnlineResp) Reset() { + *x = UserOnlineResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserOnlineResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserOnlineResp) ProtoMessage() {} + +func (x *UserOnlineResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserOnlineResp.ProtoReflect.Descriptor instead. +func (*UserOnlineResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{39} +} + +func (x *UserOnlineResp) GetUsers() []*CacheUser { + if x != nil { + return x.Users + } + return nil +} + var File_user_user_msg_proto protoreflect.FileDescriptor var file_user_user_msg_proto_rawDesc = []byte{ @@ -2116,8 +2164,11 @@ var file_user_user_msg_proto_rawDesc = []byte{ 0x65, 0x71, 0x22, 0x32, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x72, 0x6f, - 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x22, 0x32, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2132,7 +2183,7 @@ func file_user_user_msg_proto_rawDescGZIP() []byte { return file_user_user_msg_proto_rawDescData } -var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 39) +var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_user_user_msg_proto_goTypes = []interface{}{ (*UserLoginReq)(nil), // 0: UserLoginReq (*UserLoginResp)(nil), // 1: UserLoginResp @@ -2173,34 +2224,36 @@ var file_user_user_msg_proto_goTypes = []interface{}{ (*UserSettingteamResp)(nil), // 36: UserSettingteamResp (*UserShowteamReq)(nil), // 37: UserShowteamReq (*UserShowteamResp)(nil), // 38: UserShowteamResp - (*DBUser)(nil), // 39: DBUser - (*DBUserExpand)(nil), // 40: DBUserExpand - (ErrorCode)(0), // 41: ErrorCode - (*CacheUser)(nil), // 42: CacheUser - (*DBUserSetting)(nil), // 43: DBUserSetting - (*DBPagodaRecord)(nil), // 44: DBPagodaRecord - (*DBHuntingRank)(nil), // 45: DBHuntingRank - (*DBVikingRank)(nil), // 46: DBVikingRank + (*UserOnlineResp)(nil), // 39: UserOnlineResp + (*DBUser)(nil), // 40: DBUser + (*DBUserExpand)(nil), // 41: DBUserExpand + (ErrorCode)(0), // 42: ErrorCode + (*CacheUser)(nil), // 43: CacheUser + (*DBUserSetting)(nil), // 44: DBUserSetting + (*DBPagodaRecord)(nil), // 45: DBPagodaRecord + (*DBHuntingRank)(nil), // 46: DBHuntingRank + (*DBVikingRank)(nil), // 47: DBVikingRank } var file_user_user_msg_proto_depIdxs = []int32{ - 39, // 0: UserLoginResp.data:type_name -> DBUser - 40, // 1: UserLoginResp.ex:type_name -> DBUserExpand - 39, // 2: UserInfoResp.data:type_name -> DBUser - 40, // 3: UserInfoResp.ex:type_name -> DBUserExpand - 41, // 4: UserRegisterResp.Code:type_name -> ErrorCode - 42, // 5: UserLoadResp.data:type_name -> CacheUser - 43, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting - 43, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting - 39, // 8: UserBattlerecordResp.data:type_name -> DBUser - 40, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand - 44, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord - 45, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank - 46, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 40, // 0: UserLoginResp.data:type_name -> DBUser + 41, // 1: UserLoginResp.ex:type_name -> DBUserExpand + 40, // 2: UserInfoResp.data:type_name -> DBUser + 41, // 3: UserInfoResp.ex:type_name -> DBUserExpand + 42, // 4: UserRegisterResp.Code:type_name -> ErrorCode + 43, // 5: UserLoadResp.data:type_name -> CacheUser + 44, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting + 44, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting + 40, // 8: UserBattlerecordResp.data:type_name -> DBUser + 41, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand + 45, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord + 46, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank + 47, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank + 43, // 13: UserOnlineResp.users:type_name -> CacheUser + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_user_user_msg_proto_init() } @@ -2683,6 +2736,18 @@ func file_user_user_msg_proto_init() { return nil } } + file_user_user_msg_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserOnlineResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2690,7 +2755,7 @@ func file_user_user_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_user_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 39, + NumMessages: 40, NumExtensions: 0, NumServices: 0, }, From f51f492164d4d481739def608ae2ab783c79b5f2 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 18 Oct 2022 10:15:02 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E8=B7=A8=E6=9C=8Dsession?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 4 +- modules/friend/api.go | 22 ++++--- modules/friend/api_randlist.go | 6 -- modules/user/model_session.go | 15 +++-- modules/user/module.go | 40 ++++++++++-- pb/comm.pb.go | 115 +++++++++++++++++++++++++-------- 6 files changed, 149 insertions(+), 53 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index bb2097ee2..485ad9346 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -67,8 +67,10 @@ type ( //玩家 IUser interface { - //获取用户数据 + //获取本服用户数据 GetUser(uid string) *pb.DBUser + // 获取跨服用户数据 + GetCrossUser(uid string) (*pb.DBUser, error) //获取用户回话 GetUserSession(uid string) *pb.CacheUser //查询用户属性值 例如 金币 经验 diff --git a/modules/friend/api.go b/modules/friend/api.go index 657618c26..4dcf2daa3 100644 --- a/modules/friend/api.go +++ b/modules/friend/api.go @@ -38,16 +38,20 @@ func (this *apiComp) Init(service core.IService, module core.IModule, comp core. } func (this *apiComp) setDefaultFriendUserBaseInfo(userId string) *pb.FriendBase { - user := this.moduleFriend.ModuleUser.GetUser(userId) - if user != nil { - return &pb.FriendBase{ - ServerId: user.Sid, - UserId: userId, - NickName: user.Name, - Level: user.Lv, - Avatar: user.Avatar, - OfflineTime: user.Offlinetime, + if user, err := this.moduleFriend.ModuleUser.GetCrossUser(userId); err != nil { + return nil + } else { + if user != nil { + return &pb.FriendBase{ + ServerId: user.Sid, + UserId: userId, + NickName: user.Name, + Level: user.Lv, + Avatar: user.Avatar, + OfflineTime: user.Offlinetime, + } } } + return nil } diff --git a/modules/friend/api_randlist.go b/modules/friend/api_randlist.go index 5c0c26b99..cfde86e76 100644 --- a/modules/friend/api_randlist.go +++ b/modules/friend/api_randlist.go @@ -71,12 +71,6 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR continue } - // // 获取在线好友的信息 - // user := this.moduleFriend.ModuleUser.GetUser(uid) - // if user == nil { - // continue - // } - base := this.setDefaultFriendUserBaseInfo(uid) if base == nil { continue diff --git a/modules/user/model_session.go b/modules/user/model_session.go index b456fe138..c4f74c030 100644 --- a/modules/user/model_session.go +++ b/modules/user/model_session.go @@ -1,6 +1,7 @@ package user import ( + "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/log" @@ -19,7 +20,12 @@ func (this *ModelSession) Init(service core.IService, module core.IModule, comp this.module = module.(*User) this.TableName = comm.TableSession this.Expired = 0 //不自动过期 - this.clean() + return +} + +func (this *ModelSession) Start() (err error) { + this.MCompModel.Start() + this.clean(this.module.service.GetTag()) return } @@ -45,15 +51,12 @@ func (this *ModelSession) setUserSession(uid string, session comm.IUserSession) log.Debugf("setUserSession err:%v", err) return } - - // this.module.service.AcrossClusterRpcGo(context.TODO(), - // this.module.service.GetTag(), comm.Service_Worker, serviceMethod string, args interface{}, reply interface{}) return } // 启动时清理session -func (this *ModelSession) clean() { - keys, err := this.Redis.Keys("session:*") +func (this *ModelSession) clean(key string) { + keys, err := this.Redis.Keys(fmt.Sprintf("session:%s-", key)) if err != nil { log.Errorf("redis keys err:%v", err) return diff --git a/modules/user/module.go b/modules/user/module.go index d9a26f6b1..f6a7d26d8 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -7,6 +7,7 @@ import ( "go_dreamfactory/modules" "go_dreamfactory/pb" "go_dreamfactory/sys/db" + "go_dreamfactory/utils" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" @@ -17,7 +18,10 @@ import ( ) const ( + // 跨服玩家 Rpc_GetAllOnlineUser string = "Rpc_GetAllOnlineUser" + // 跨服用户 + Rpc_GetCrossUser string = "Rpc_GetCrossUser" ) var _ comm.IUser = (*User)(nil) @@ -51,7 +55,8 @@ func (this *User) Init(service core.IService, module core.IModule, options core. func (this *User) Start() (err error) { err = this.ModuleBase.Start() event.RegisterGO(comm.EventUserOffline, this.CleanSession) - this.service.RegisterFunctionName(Rpc_GetAllOnlineUser, this.GetAllOnlineUser) + this.service.RegisterFunctionName(Rpc_GetAllOnlineUser, this.RpcGetAllOnlineUser) + this.service.RegisterFunctionName(Rpc_GetCrossUser, this.RpcGetCrossUser) return } @@ -73,6 +78,14 @@ func (this *User) GetUser(uid string) *pb.DBUser { return user } +// 获取跨服用户数据 +func (this *User) GetCrossUser(uid string) (*pb.DBUser, error) { + reply := &pb.DBUser{} + err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), + comm.Service_Worker, Rpc_GetCrossUser, &pb.UIdReq{Uid: uid}, reply) + return reply, err +} + //获取用户会话 func (this *User) GetUserSession(uid string) *pb.CacheUser { return this.modelSession.getUserSession(uid) @@ -101,7 +114,7 @@ func (this *User) UserOnlineList() ([]*pb.CacheUser, error) { // 跨服玩家列表 func (this *User) CrossUserOnlineList() ([]*pb.CacheUser, error) { reply := &pb.UserOnlineResp{} - err := this.service.AcrossClusterRpcCall(context.Background(), this.service.GetTag(), + err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), comm.Service_Worker, Rpc_GetAllOnlineUser, nil, reply) return reply.Users, err } @@ -275,8 +288,8 @@ func (this *User) ChangeUserExpand(uid string, value map[string]interface{}) err return this.modelExpand.ChangeUserExpand(uid, value) } -func (this *User) GetAllOnlineUser(ctx context.Context, args *pb.EmptyReq, reply *pb.UserOnlineResp) error { - conn, err := db.Cross() +func (this *User) RpcGetAllOnlineUser(ctx context.Context, args *pb.EmptyReq, reply *pb.UserOnlineResp) error { + conn, err := db.Local() if err != nil { log.Errorf("cross db err: %v", err) return err @@ -289,3 +302,22 @@ func (this *User) GetAllOnlineUser(ctx context.Context, args *pb.EmptyReq, reply reply.Users = cache return nil } + +func (this *User) RpcGetCrossUser(ctx context.Context, req *pb.UIdReq, reply *pb.DBUser) error { + sid, _, ok := utils.UIdSplit(req.Uid) + if !ok { + return errors.New("sid split error") + } + conn, err := db.ServerDBConn(sid) + if err != nil { + log.Errorf("cross db err: %v", err) + return err + } + model := db.NewDBModel(comm.TableUser, 0, conn) + + if err := model.Get(req.Uid, reply); err != nil { + return err + } + + return nil +} diff --git a/pb/comm.pb.go b/pb/comm.pb.go index e83278621..619aac825 100644 --- a/pb/comm.pb.go +++ b/pb/comm.pb.go @@ -1020,6 +1020,53 @@ func (x *RtaskParam) GetParam3() int32 { return 0 } +type UIdReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` +} + +func (x *UIdReq) Reset() { + *x = UIdReq{} + if protoimpl.UnsafeEnabled { + mi := &file_comm_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UIdReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UIdReq) ProtoMessage() {} + +func (x *UIdReq) ProtoReflect() protoreflect.Message { + mi := &file_comm_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UIdReq.ProtoReflect.Descriptor instead. +func (*UIdReq) Descriptor() ([]byte, []int) { + return file_comm_proto_rawDescGZIP(), []int{14} +} + +func (x *UIdReq) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + type EmptyReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1029,7 +1076,7 @@ type EmptyReq struct { func (x *EmptyReq) Reset() { *x = EmptyReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[14] + mi := &file_comm_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1042,7 +1089,7 @@ func (x *EmptyReq) String() string { func (*EmptyReq) ProtoMessage() {} func (x *EmptyReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[14] + mi := &file_comm_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1055,7 +1102,7 @@ func (x *EmptyReq) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead. func (*EmptyReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{14} + return file_comm_proto_rawDescGZIP(), []int{15} } type EmptyResp struct { @@ -1067,7 +1114,7 @@ type EmptyResp struct { func (x *EmptyResp) Reset() { *x = EmptyResp{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[15] + mi := &file_comm_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1080,7 +1127,7 @@ func (x *EmptyResp) String() string { func (*EmptyResp) ProtoMessage() {} func (x *EmptyResp) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[15] + mi := &file_comm_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1093,7 +1140,7 @@ func (x *EmptyResp) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead. func (*EmptyResp) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{15} + return file_comm_proto_rawDescGZIP(), []int{16} } var File_comm_proto protoreflect.FileDescriptor @@ -1210,14 +1257,15 @@ var file_comm_proto_rawDesc = []byte{ 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, - 0x71, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x2a, 0x43, - 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, - 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, - 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, - 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x1a, 0x0a, 0x06, 0x55, 0x49, 0x64, 0x52, 0x65, 0x71, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x71, 0x22, 0x0b, 0x0a, + 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, + 0x72, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, + 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, + 0x65, 0x65, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1233,7 +1281,7 @@ func file_comm_proto_rawDescGZIP() []byte { } var file_comm_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_comm_proto_goTypes = []interface{}{ (HeroAttributesType)(0), // 0: HeroAttributesType (*UserMessage)(nil), // 1: UserMessage @@ -1250,20 +1298,21 @@ var file_comm_proto_goTypes = []interface{}{ (*UserAssets)(nil), // 12: UserAssets (*TaskParam)(nil), // 13: TaskParam (*RtaskParam)(nil), // 14: RtaskParam - (*EmptyReq)(nil), // 15: EmptyReq - (*EmptyResp)(nil), // 16: EmptyResp - (*anypb.Any)(nil), // 17: google.protobuf.Any - (ErrorCode)(0), // 18: ErrorCode + (*UIdReq)(nil), // 15: UIdReq + (*EmptyReq)(nil), // 16: EmptyReq + (*EmptyResp)(nil), // 17: EmptyResp + (*anypb.Any)(nil), // 18: google.protobuf.Any + (ErrorCode)(0), // 19: ErrorCode } var file_comm_proto_depIdxs = []int32{ - 17, // 0: UserMessage.data:type_name -> google.protobuf.Any - 17, // 1: AgentMessage.Message:type_name -> google.protobuf.Any - 18, // 2: RPCMessageReply.Code:type_name -> ErrorCode - 17, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any + 18, // 0: UserMessage.data:type_name -> google.protobuf.Any + 18, // 1: AgentMessage.Message:type_name -> google.protobuf.Any + 19, // 2: RPCMessageReply.Code:type_name -> ErrorCode + 18, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any 1, // 4: RPCMessageReply.Reply:type_name -> UserMessage 1, // 5: AgentSendMessageReq.Reply:type_name -> UserMessage - 17, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any - 17, // 7: BroadCastMessageReq.Data:type_name -> google.protobuf.Any + 18, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any + 18, // 7: BroadCastMessageReq.Data:type_name -> google.protobuf.Any 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -1447,7 +1496,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyReq); i { + switch v := v.(*UIdReq); i { case 0: return &v.state case 1: @@ -1459,6 +1508,18 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_comm_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyResp); i { case 0: return &v.state @@ -1477,7 +1538,7 @@ func file_comm_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_comm_proto_rawDesc, NumEnums: 1, - NumMessages: 16, + NumMessages: 17, NumExtensions: 0, NumServices: 0, }, From 6ddec9b66cc646e9e35d3719a69abd92a0fb168c Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 18 Oct 2022 10:18:14 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=85=E7=90=86?= =?UTF-8?q?=E7=9A=84session=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/model_session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/user/model_session.go b/modules/user/model_session.go index c4f74c030..84841e605 100644 --- a/modules/user/model_session.go +++ b/modules/user/model_session.go @@ -56,7 +56,7 @@ func (this *ModelSession) setUserSession(uid string, session comm.IUserSession) // 启动时清理session func (this *ModelSession) clean(key string) { - keys, err := this.Redis.Keys(fmt.Sprintf("session:%s-", key)) + keys, err := this.Redis.Keys(fmt.Sprintf("session:%s-%s_*", comm.RDS_SESSION, key)) if err != nil { log.Errorf("redis keys err:%v", err) return From daffea58339873ffd855f253a86c347b5904338f Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 18 Oct 2022 12:01:33 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=B7=A8=E6=9C=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=A5=BD=E5=8F=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 2 + modules/friend/api_search.go | 32 ++-- modules/user/module.go | 45 ++++++ pb/comm.pb.go | 114 ++++++++++---- pb/friend_msg.pb.go | 289 ++++++++++++++++++----------------- pb/user_msg.pb.go | 129 ++++++++++++---- 6 files changed, 390 insertions(+), 221 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index 485ad9346..7218c5723 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -89,6 +89,8 @@ type ( UserOnlineList() ([]*pb.CacheUser, error) // 跨服在线玩家列表 CrossUserOnlineList() ([]*pb.CacheUser, error) + // 跨服搜索玩家 + CrossSearchUser(nickname string) ([]*pb.DBUser, error) } //武器模块 IEquipment interface { diff --git a/modules/friend/api_search.go b/modules/friend/api_search.go index bf40fa51c..4994e43fa 100644 --- a/modules/friend/api_search.go +++ b/modules/friend/api_search.go @@ -21,27 +21,19 @@ func (this *apiComp) Search(session comm.IUserSession, req *pb.FriendSearchReq) return } - var ( - Resp *pb.FriendSearchResp - friend *pb.FriendBase - ) - defer func() { - if code == pb.ErrorCode_Success { - Resp = &pb.FriendSearchResp{ - Friend: friend, - } - } - if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeSearch, Resp); err != nil { - code = pb.ErrorCode_SystemError - } - }() + resp := &pb.FriendSearchResp{} - user := this.moduleFriend.modelFriend.Frined_FindCond(req.NickName) - if user != nil { - friend = &pb.FriendBase{ - UserId: user.Uid, - NickName: user.Name, - } + users, err := this.moduleFriend.ModuleUser.CrossSearchUser(req.NickName) + if err != nil { + code = pb.ErrorCode_DBError + return } + + resp.Users = users + + if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeSearch, resp); err != nil { + code = pb.ErrorCode_SystemError + } + return } diff --git a/modules/user/module.go b/modules/user/module.go index f6a7d26d8..04fe3085d 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -8,6 +8,7 @@ import ( "go_dreamfactory/pb" "go_dreamfactory/sys/db" "go_dreamfactory/utils" + "strings" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" @@ -15,6 +16,7 @@ import ( "go_dreamfactory/lego/sys/log" "github.com/pkg/errors" + "go.mongodb.org/mongo-driver/bson" ) const ( @@ -22,6 +24,8 @@ const ( Rpc_GetAllOnlineUser string = "Rpc_GetAllOnlineUser" // 跨服用户 Rpc_GetCrossUser string = "Rpc_GetCrossUser" + // 搜索用户 + Rpc_QueryUser = "Rpc_QueryUser" ) var _ comm.IUser = (*User)(nil) @@ -57,6 +61,7 @@ func (this *User) Start() (err error) { event.RegisterGO(comm.EventUserOffline, this.CleanSession) this.service.RegisterFunctionName(Rpc_GetAllOnlineUser, this.RpcGetAllOnlineUser) this.service.RegisterFunctionName(Rpc_GetCrossUser, this.RpcGetCrossUser) + this.service.RegisterFunctionName(Rpc_QueryUser, this.RpcQueryUser) return } @@ -119,6 +124,23 @@ func (this *User) CrossUserOnlineList() ([]*pb.CacheUser, error) { return reply.Users, err } +//跨服搜索用户 +func (this *User) CrossSearchUser(nickName string) ([]*pb.DBUser, error) { + name := strings.TrimSpace(nickName) + if name == "" { + return nil, errors.New("search name is empty") + } + reply := &pb.UserDataListResp{} + err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), + comm.Service_Worker, Rpc_QueryUser, &pb.NameReq{Name: name}, reply) + if err != nil { + log.Errorf("Rpc_QueryUser err:%v", err) + return nil, err + } + + return reply.Users, nil +} + //查询用户属性值 例如 金币 经验 func (this *User) QueryAttributeValue(uid string, attr string) (value int64) { user := this.modelUser.GetUser(uid) @@ -321,3 +343,26 @@ func (this *User) RpcGetCrossUser(ctx context.Context, req *pb.UIdReq, reply *pb return nil } + +func (this *User) RpcQueryUser(ctx context.Context, req *pb.NameReq, reply *pb.UserDataListResp) error { + // 区服列表 + for _, tag := range db.GetServerTags() { + conn, err := db.ServerDBConn(tag) + if err != nil { + log.Errorf("cross db err: %v", err) + return err + } + + //查询用户 + filter := bson.M{ + "name": req.Name, + } + sr := conn.Mgo.FindOne(comm.TableUser, filter) + user := &pb.DBUser{} + if err = sr.Decode(user); err != nil { + return err + } + reply.Users = append(reply.Users, user) + } + return nil +} diff --git a/pb/comm.pb.go b/pb/comm.pb.go index 619aac825..dee2168be 100644 --- a/pb/comm.pb.go +++ b/pb/comm.pb.go @@ -1067,6 +1067,53 @@ func (x *UIdReq) GetUid() string { return "" } +type NameReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` +} + +func (x *NameReq) Reset() { + *x = NameReq{} + if protoimpl.UnsafeEnabled { + mi := &file_comm_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NameReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NameReq) ProtoMessage() {} + +func (x *NameReq) ProtoReflect() protoreflect.Message { + mi := &file_comm_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NameReq.ProtoReflect.Descriptor instead. +func (*NameReq) Descriptor() ([]byte, []int) { + return file_comm_proto_rawDescGZIP(), []int{15} +} + +func (x *NameReq) GetName() string { + if x != nil { + return x.Name + } + return "" +} + type EmptyReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1076,7 +1123,7 @@ type EmptyReq struct { func (x *EmptyReq) Reset() { *x = EmptyReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[15] + mi := &file_comm_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1089,7 +1136,7 @@ func (x *EmptyReq) String() string { func (*EmptyReq) ProtoMessage() {} func (x *EmptyReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[15] + mi := &file_comm_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1102,7 +1149,7 @@ func (x *EmptyReq) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead. func (*EmptyReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{15} + return file_comm_proto_rawDescGZIP(), []int{16} } type EmptyResp struct { @@ -1114,7 +1161,7 @@ type EmptyResp struct { func (x *EmptyResp) Reset() { *x = EmptyResp{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[16] + mi := &file_comm_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1127,7 +1174,7 @@ func (x *EmptyResp) String() string { func (*EmptyResp) ProtoMessage() {} func (x *EmptyResp) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[16] + mi := &file_comm_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1140,7 +1187,7 @@ func (x *EmptyResp) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead. func (*EmptyResp) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{16} + return file_comm_proto_rawDescGZIP(), []int{17} } var File_comm_proto protoreflect.FileDescriptor @@ -1259,13 +1306,15 @@ var file_comm_proto_rawDesc = []byte{ 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x1a, 0x0a, 0x06, 0x55, 0x49, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x71, 0x22, 0x0b, 0x0a, - 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, - 0x72, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, - 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, - 0x65, 0x65, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x22, 0x1d, 0x0a, 0x07, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x71, 0x22, 0x0b, 0x0a, 0x09, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, 0x72, + 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01, + 0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65, + 0x65, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1281,7 +1330,7 @@ func file_comm_proto_rawDescGZIP() []byte { } var file_comm_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_comm_proto_goTypes = []interface{}{ (HeroAttributesType)(0), // 0: HeroAttributesType (*UserMessage)(nil), // 1: UserMessage @@ -1299,20 +1348,21 @@ var file_comm_proto_goTypes = []interface{}{ (*TaskParam)(nil), // 13: TaskParam (*RtaskParam)(nil), // 14: RtaskParam (*UIdReq)(nil), // 15: UIdReq - (*EmptyReq)(nil), // 16: EmptyReq - (*EmptyResp)(nil), // 17: EmptyResp - (*anypb.Any)(nil), // 18: google.protobuf.Any - (ErrorCode)(0), // 19: ErrorCode + (*NameReq)(nil), // 16: NameReq + (*EmptyReq)(nil), // 17: EmptyReq + (*EmptyResp)(nil), // 18: EmptyResp + (*anypb.Any)(nil), // 19: google.protobuf.Any + (ErrorCode)(0), // 20: ErrorCode } var file_comm_proto_depIdxs = []int32{ - 18, // 0: UserMessage.data:type_name -> google.protobuf.Any - 18, // 1: AgentMessage.Message:type_name -> google.protobuf.Any - 19, // 2: RPCMessageReply.Code:type_name -> ErrorCode - 18, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any + 19, // 0: UserMessage.data:type_name -> google.protobuf.Any + 19, // 1: AgentMessage.Message:type_name -> google.protobuf.Any + 20, // 2: RPCMessageReply.Code:type_name -> ErrorCode + 19, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any 1, // 4: RPCMessageReply.Reply:type_name -> UserMessage 1, // 5: AgentSendMessageReq.Reply:type_name -> UserMessage - 18, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any - 18, // 7: BroadCastMessageReq.Data:type_name -> google.protobuf.Any + 19, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any + 19, // 7: BroadCastMessageReq.Data:type_name -> google.protobuf.Any 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -1508,7 +1558,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyReq); i { + switch v := v.(*NameReq); i { case 0: return &v.state case 1: @@ -1520,6 +1570,18 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_comm_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyResp); i { case 0: return &v.state @@ -1538,7 +1600,7 @@ func file_comm_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_comm_proto_rawDesc, NumEnums: 1, - NumMessages: 17, + NumMessages: 18, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/friend_msg.pb.go b/pb/friend_msg.pb.go index 1f1677484..a9bd911b5 100644 --- a/pb/friend_msg.pb.go +++ b/pb/friend_msg.pb.go @@ -854,7 +854,7 @@ type FriendSearchResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Friend *FriendBase `protobuf:"bytes,1,opt,name=friend,proto3" json:"friend"` + Users []*DBUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users"` } func (x *FriendSearchResp) Reset() { @@ -889,9 +889,9 @@ func (*FriendSearchResp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{16} } -func (x *FriendSearchResp) GetFriend() *FriendBase { +func (x *FriendSearchResp) GetUsers() []*DBUser { if x != nil { - return x.Friend + return x.Users } return nil } @@ -1854,137 +1854,138 @@ var File_friend_friend_msg_proto protoreflect.FileDescriptor var file_friend_friend_msg_proto_rawDesc = []byte{ 0x0a, 0x17, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, - 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, 0x0a, 0x0a, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 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, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, - 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x74, - 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, - 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x69, - 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x73, 0x47, 0x65, 0x74, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x69, 0x73, 0x47, 0x65, 0x74, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x31, 0x0a, 0x0e, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, + 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, + 0x0a, 0x0a, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 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, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x66, 0x66, + 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x41, 0x70, + 0x70, 0x6c, 0x69, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x41, + 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x5a, 0x61, 0x6e, 0x65, + 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x5a, 0x61, 0x6e, 0x65, 0x64, + 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x47, 0x65, 0x74, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x47, 0x65, 0x74, 0x5a, 0x61, 0x6e, 0x65, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x22, 0x0f, + 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, + 0x31, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, + 0x73, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x6e, 0x64, + 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x52, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x13, - 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x6e, - 0x64, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x0e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 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, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, - 0x2a, 0x0a, 0x0c, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, - 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x0d, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x22, 0x2e, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x67, 0x72, 0x65, 0x65, 0x52, - 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, - 0x22, 0x23, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x67, 0x72, 0x65, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x2f, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x22, 0x24, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x14, 0x0a, 0x12, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x22, 0x36, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, - 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2d, 0x0a, 0x0f, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, - 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x37, 0x0a, 0x10, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, - 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, - 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x3c, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x25, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x07, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x2f, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x41, 0x64, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, + 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2c, + 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x0f, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 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, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0c, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, + 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, + 0x43, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x67, + 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x49, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x67, + 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x2f, 0x0a, 0x0f, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x22, 0x24, 0x0a, 0x10, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, + 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, + 0x22, 0x14, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x36, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2d, + 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, + 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1d, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x22, 0x14, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x3c, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, + 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x07, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x73, 0x22, 0x2f, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x64, + 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, + 0x64, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x41, 0x64, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, - 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x22, 0x2f, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, 0x42, 0x6c, - 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, + 0x2f, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, 0x42, 0x6c, 0x61, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, + 0x22, 0x48, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, 0x42, 0x6c, 0x61, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x49, 0x64, 0x22, 0x48, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, 0x42, - 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x0e, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1a, - 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x0f, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, - 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, - 0x12, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x6c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, - 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, - 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x0c, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x5a, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x33, 0x0a, 0x13, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, - 0x73, 0x22, 0x2a, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x33, 0x0a, - 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, 0x73, 0x74, 0x68, 0x65, 0x72, - 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, - 0x49, 0x64, 0x22, 0x50, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, - 0x73, 0x74, 0x68, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, - 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, - 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, - 0x73, 0x69, 0x73, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x55, 0x0a, 0x14, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, 0x73, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, - 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x31, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x47, 0x65, 0x74, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x0e, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x12, 0x0a, + 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x22, 0x34, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x6c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, + 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x0c, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x5a, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x49, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, + 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x33, 0x0a, 0x13, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x22, + 0x2a, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x33, 0x0a, 0x13, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, 0x73, 0x74, 0x68, 0x65, 0x72, 0x6f, 0x52, + 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, + 0x22, 0x50, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, 0x73, 0x74, + 0x68, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, + 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, + 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, + 0x73, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x55, 0x0a, 0x14, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, 0x73, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, + 0x22, 0x14, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x47, 0x65, 0x74, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x31, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x47, 0x65, 0x74, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2038,20 +2039,21 @@ var file_friend_friend_msg_proto_goTypes = []interface{}{ (*FriendAssistlistResp)(nil), // 34: FriendAssistlistResp (*FriendGetrewardReq)(nil), // 35: FriendGetrewardReq (*FriendGetrewardResp)(nil), // 36: FriendGetrewardResp + (*DBUser)(nil), // 37: DBUser } var file_friend_friend_msg_proto_depIdxs = []int32{ - 0, // 0: FriendListResp.list:type_name -> FriendBase - 0, // 1: FriendRandlistResp.list:type_name -> FriendBase - 0, // 2: FriendApplyListResp.list:type_name -> FriendBase - 0, // 3: FriendSearchResp.friend:type_name -> FriendBase - 0, // 4: FriendBlackListResp.friends:type_name -> FriendBase - 0, // 5: FriendZanlistResp.list:type_name -> FriendBase - 0, // 6: FriendAssistlistResp.list:type_name -> FriendBase - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 0, // 0: FriendListResp.list:type_name -> FriendBase + 0, // 1: FriendRandlistResp.list:type_name -> FriendBase + 0, // 2: FriendApplyListResp.list:type_name -> FriendBase + 37, // 3: FriendSearchResp.users:type_name -> DBUser + 0, // 4: FriendBlackListResp.friends:type_name -> FriendBase + 0, // 5: FriendZanlistResp.list:type_name -> FriendBase + 0, // 6: FriendAssistlistResp.list:type_name -> FriendBase + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_friend_friend_msg_proto_init() } @@ -2059,6 +2061,7 @@ func file_friend_friend_msg_proto_init() { if File_friend_friend_msg_proto != nil { return } + file_user_user_db_proto_init() if !protoimpl.UnsafeEnabled { file_friend_friend_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FriendBase); i { diff --git a/pb/user_msg.pb.go b/pb/user_msg.pb.go index 328029025..4f8847d8a 100644 --- a/pb/user_msg.pb.go +++ b/pb/user_msg.pb.go @@ -1970,7 +1970,7 @@ func (x *UserShowteamResp) GetHeroObjIds() []string { return nil } -// 全服在线玩家列表 +// 全服在线用用户session type UserOnlineResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2018,6 +2018,54 @@ func (x *UserOnlineResp) GetUsers() []*CacheUser { return nil } +// 用户数据列表 +type UserDataListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Users []*DBUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users"` +} + +func (x *UserDataListResp) Reset() { + *x = UserDataListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserDataListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserDataListResp) ProtoMessage() {} + +func (x *UserDataListResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserDataListResp.ProtoReflect.Descriptor instead. +func (*UserDataListResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{40} +} + +func (x *UserDataListResp) GetUsers() []*DBUser { + if x != nil { + return x.Users + } + return nil +} + var File_user_user_msg_proto protoreflect.FileDescriptor var file_user_user_msg_proto_rawDesc = []byte{ @@ -2167,8 +2215,11 @@ var file_user_user_msg_proto_rawDesc = []byte{ 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x22, 0x32, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a, 0x10, 0x55, 0x73, + 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, + 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, + 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2183,7 +2234,7 @@ func file_user_user_msg_proto_rawDescGZIP() []byte { return file_user_user_msg_proto_rawDescData } -var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 41) var file_user_user_msg_proto_goTypes = []interface{}{ (*UserLoginReq)(nil), // 0: UserLoginReq (*UserLoginResp)(nil), // 1: UserLoginResp @@ -2225,35 +2276,37 @@ var file_user_user_msg_proto_goTypes = []interface{}{ (*UserShowteamReq)(nil), // 37: UserShowteamReq (*UserShowteamResp)(nil), // 38: UserShowteamResp (*UserOnlineResp)(nil), // 39: UserOnlineResp - (*DBUser)(nil), // 40: DBUser - (*DBUserExpand)(nil), // 41: DBUserExpand - (ErrorCode)(0), // 42: ErrorCode - (*CacheUser)(nil), // 43: CacheUser - (*DBUserSetting)(nil), // 44: DBUserSetting - (*DBPagodaRecord)(nil), // 45: DBPagodaRecord - (*DBHuntingRank)(nil), // 46: DBHuntingRank - (*DBVikingRank)(nil), // 47: DBVikingRank + (*UserDataListResp)(nil), // 40: UserDataListResp + (*DBUser)(nil), // 41: DBUser + (*DBUserExpand)(nil), // 42: DBUserExpand + (ErrorCode)(0), // 43: ErrorCode + (*CacheUser)(nil), // 44: CacheUser + (*DBUserSetting)(nil), // 45: DBUserSetting + (*DBPagodaRecord)(nil), // 46: DBPagodaRecord + (*DBHuntingRank)(nil), // 47: DBHuntingRank + (*DBVikingRank)(nil), // 48: DBVikingRank } var file_user_user_msg_proto_depIdxs = []int32{ - 40, // 0: UserLoginResp.data:type_name -> DBUser - 41, // 1: UserLoginResp.ex:type_name -> DBUserExpand - 40, // 2: UserInfoResp.data:type_name -> DBUser - 41, // 3: UserInfoResp.ex:type_name -> DBUserExpand - 42, // 4: UserRegisterResp.Code:type_name -> ErrorCode - 43, // 5: UserLoadResp.data:type_name -> CacheUser - 44, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting - 44, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting - 40, // 8: UserBattlerecordResp.data:type_name -> DBUser - 41, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand - 45, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord - 46, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank - 47, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank - 43, // 13: UserOnlineResp.users:type_name -> CacheUser - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 41, // 0: UserLoginResp.data:type_name -> DBUser + 42, // 1: UserLoginResp.ex:type_name -> DBUserExpand + 41, // 2: UserInfoResp.data:type_name -> DBUser + 42, // 3: UserInfoResp.ex:type_name -> DBUserExpand + 43, // 4: UserRegisterResp.Code:type_name -> ErrorCode + 44, // 5: UserLoadResp.data:type_name -> CacheUser + 45, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting + 45, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting + 41, // 8: UserBattlerecordResp.data:type_name -> DBUser + 42, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand + 46, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord + 47, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank + 48, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank + 44, // 13: UserOnlineResp.users:type_name -> CacheUser + 41, // 14: UserDataListResp.users:type_name -> DBUser + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_user_user_msg_proto_init() } @@ -2748,6 +2801,18 @@ func file_user_user_msg_proto_init() { return nil } } + file_user_user_msg_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserDataListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2755,7 +2820,7 @@ func file_user_user_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_user_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 40, + NumMessages: 41, NumExtensions: 0, NumServices: 0, }, From 765d9ce83378729ae773cb99aeb705d5863f45bf Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 18 Oct 2022 12:05:45 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E9=93=81=E5=8C=A0=E9=93=BA=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=9C=A8=E7=BA=BF=E7=8E=A9=E5=AE=B6=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gourmet/api.go | 1 + modules/gourmet/api_getranduser.go | 63 +++++++++ modules/hero/hero_test.go | 6 +- modules/smithy/api_getranduser.go | 41 ++++-- pb/gourmet_msg.pb.go | 205 +++++++++++++++++++++++------ pb/smithy_msg.pb.go | 93 +++++++------ 6 files changed, 323 insertions(+), 86 deletions(-) create mode 100644 modules/gourmet/api_getranduser.go diff --git a/modules/gourmet/api.go b/modules/gourmet/api.go index 911595587..2e07071d9 100644 --- a/modules/gourmet/api.go +++ b/modules/gourmet/api.go @@ -10,6 +10,7 @@ const ( GourmetCreateOrderResp = "createorder" GourmetSkillLvResp = "skilllv" GourmetGetRewardResp = "getreward" + GourmetGetRandUserResp = "getranduser" ) type apiComp struct { diff --git a/modules/gourmet/api_getranduser.go b/modules/gourmet/api_getranduser.go new file mode 100644 index 000000000..ad48dba38 --- /dev/null +++ b/modules/gourmet/api_getranduser.go @@ -0,0 +1,63 @@ +package gourmet + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + "go_dreamfactory/utils" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) GetRandUserCheck(session comm.IUserSession, req *pb.GourmetGetRandUserReq) (code pb.ErrorCode) { + if req.People <= 0 { + code = pb.ErrorCode_ReqParameterError + return + } + return +} + +/// 获取一些玩家数据 +func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.GourmetGetRandUserReq) (code pb.ErrorCode, data proto.Message) { + var ( + szDbUser []*pb.DBUser + randOnlineUsers []string + ) + code = this.GetRandUserCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + // 获取在线玩家信息 + onlineList, err := this.module.ModuleUser.UserOnlineList() + if err != nil { + code = pb.ErrorCode_DBError + return + } + + var szUid []string + for _, v := range onlineList { + if v.Uid == session.GetUserId() { // 过滤自己信息 + continue + } + + szUid = append(szUid, v.Uid) + } + // 随机在线玩家信息 + if len(onlineList) > int(req.People) { + randArr := utils.Numbers(0, len(onlineList), int(req.People)) + for _, v := range randArr { + if szUid[v] != "" { + randOnlineUsers = append(randOnlineUsers, szUid[v]) + } + } + } else { // 数量不足 则有多少给多少 + for _, v := range szUid { + randOnlineUsers = append(randOnlineUsers, v) + } + } + for _, v := range randOnlineUsers { + szDbUser = append(szDbUser, this.module.ModuleUser.GetUser(v)) // 转成user对象 + } + session.SendMsg(string(this.module.GetType()), GourmetGetRandUserResp, &pb.GourmetGetRandUserResp{User: szDbUser}) + return +} diff --git a/modules/hero/hero_test.go b/modules/hero/hero_test.go index 86084e2ec..663fbb5aa 100644 --- a/modules/hero/hero_test.go +++ b/modules/hero/hero_test.go @@ -17,6 +17,7 @@ import ( "go_dreamfactory/services" "go_dreamfactory/sys/configure" "go_dreamfactory/sys/db" + "go_dreamfactory/utils" "reflect" "strings" "testing" @@ -59,7 +60,10 @@ func (this *TestService) InitSys() { } func Test_Main(t *testing.T) { - + ids := utils.Numbers(0, 10, 5) + for _, v := range ids { + fmt.Printf("%d", v) + } oldHero := new(pb.DBHero) oldHero.Lv = 2 new := copyPoint(oldHero) diff --git a/modules/smithy/api_getranduser.go b/modules/smithy/api_getranduser.go index 7840b5947..3f2ddb9f7 100644 --- a/modules/smithy/api_getranduser.go +++ b/modules/smithy/api_getranduser.go @@ -10,31 +10,54 @@ import ( //参数校验 func (this *apiComp) GetRandUserCheck(session comm.IUserSession, req *pb.SmithyGetRandUserReq) (code pb.ErrorCode) { - + if req.People <= 0 { + code = pb.ErrorCode_ReqParameterError + return + } return } /// 获取一些玩家数据 func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.SmithyGetRandUserReq) (code pb.ErrorCode, data proto.Message) { - + var ( + szDbUser []*pb.DBUser + randOnlineUsers []string + ) code = this.GetRandUserCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - cu, err := this.module.ModuleUser.UserOnlineList() + // 获取在线玩家信息 + onlineList, err := this.module.ModuleUser.UserOnlineList() if err != nil { code = pb.ErrorCode_DBError return } - var randOnlineUsers []string - if len(cu) > 5 { - randArr := utils.Numbers(0, len(cu), 5) + + var szUid []string + for _, v := range onlineList { + if v.Uid == session.GetUserId() { // 过滤自己信息 + continue + } + + szUid = append(szUid, v.Uid) + } + // 随机在线玩家信息 + if len(onlineList) > int(req.People) { + randArr := utils.Numbers(0, len(onlineList), int(req.People)) for _, v := range randArr { - if cu[v] != nil { - randOnlineUsers = append(randOnlineUsers, cu[v].Uid) + if szUid[v] != "" { + randOnlineUsers = append(randOnlineUsers, szUid[v]) } } + } else { // 数量不足 则有多少给多少 + for _, v := range szUid { + randOnlineUsers = append(randOnlineUsers, v) + } } - session.SendMsg(string(this.module.GetType()), SmithyGetRandUserResp, &pb.SmithyGetRandUserResp{User: randOnlineUsers}) + for _, v := range randOnlineUsers { + szDbUser = append(szDbUser, this.module.ModuleUser.GetUser(v)) // 转成user对象 + } + session.SendMsg(string(this.module.GetType()), SmithyGetRandUserResp, &pb.SmithyGetRandUserResp{User: szDbUser}) return } diff --git a/pb/gourmet_msg.pb.go b/pb/gourmet_msg.pb.go index ca021a38b..af8c6b20f 100644 --- a/pb/gourmet_msg.pb.go +++ b/pb/gourmet_msg.pb.go @@ -383,37 +383,139 @@ func (x *GourmetSkillLvResp) GetData() *DBGourmet { return nil } +type GourmetGetRandUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + People int32 `protobuf:"varint,1,opt,name=people,proto3" json:"people"` //人数 +} + +func (x *GourmetGetRandUserReq) Reset() { + *x = GourmetGetRandUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_gourmet_gourmet_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GourmetGetRandUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GourmetGetRandUserReq) ProtoMessage() {} + +func (x *GourmetGetRandUserReq) ProtoReflect() protoreflect.Message { + mi := &file_gourmet_gourmet_msg_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GourmetGetRandUserReq.ProtoReflect.Descriptor instead. +func (*GourmetGetRandUserReq) Descriptor() ([]byte, []int) { + return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{8} +} + +func (x *GourmetGetRandUserReq) GetPeople() int32 { + if x != nil { + return x.People + } + return 0 +} + +type GourmetGetRandUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User []*DBUser `protobuf:"bytes,1,rep,name=user,proto3" json:"user"` +} + +func (x *GourmetGetRandUserResp) Reset() { + *x = GourmetGetRandUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_gourmet_gourmet_msg_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GourmetGetRandUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GourmetGetRandUserResp) ProtoMessage() {} + +func (x *GourmetGetRandUserResp) ProtoReflect() protoreflect.Message { + mi := &file_gourmet_gourmet_msg_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GourmetGetRandUserResp.ProtoReflect.Descriptor instead. +func (*GourmetGetRandUserResp) Descriptor() ([]byte, []int) { + return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{9} +} + +func (x *GourmetGetRandUserResp) GetUser() []*DBUser { + if x != nil { + return x.User + } + return nil +} + var File_gourmet_gourmet_msg_proto protoreflect.FileDescriptor var file_gourmet_gourmet_msg_proto_rawDesc = []byte{ 0x0a, 0x19, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x5f, 0x64, 0x62, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, - 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x6f, - 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x39, 0x0a, 0x15, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x05, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x43, 0x6f, 0x6f, 0x6b, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x38, 0x0a, 0x16, 0x47, - 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x36, 0x0a, 0x14, - 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x6f, 0x75, + 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, + 0x0a, 0x12, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x31, 0x0a, 0x11, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x53, - 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6b, 0x69, - 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x6b, - 0x69, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x6f, 0x75, 0x72, 0x6d, - 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, - 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x15, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, + 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6f, 0x6b, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, + 0x38, 0x0a, 0x16, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, + 0x6d, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x6f, 0x75, + 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x22, 0x36, 0x0a, 0x14, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, + 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x31, 0x0a, 0x11, 0x47, 0x6f, 0x75, 0x72, + 0x6d, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x34, 0x0a, 0x12, 0x47, + 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, + 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, + 0x6c, 0x65, 0x22, 0x35, 0x0a, 0x16, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -428,7 +530,7 @@ func file_gourmet_gourmet_msg_proto_rawDescGZIP() []byte { return file_gourmet_gourmet_msg_proto_rawDescData } -var file_gourmet_gourmet_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_gourmet_gourmet_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_gourmet_gourmet_msg_proto_goTypes = []interface{}{ (*GourmetGetListReq)(nil), // 0: GourmetGetListReq (*GourmetGetListResp)(nil), // 1: GourmetGetListResp @@ -438,20 +540,24 @@ var file_gourmet_gourmet_msg_proto_goTypes = []interface{}{ (*GourmetGetRewardResp)(nil), // 5: GourmetGetRewardResp (*GourmetSkillLvReq)(nil), // 6: GourmetSkillLvReq (*GourmetSkillLvResp)(nil), // 7: GourmetSkillLvResp - (*DBGourmet)(nil), // 8: DBGourmet - (*OrderCook)(nil), // 9: OrderCook + (*GourmetGetRandUserReq)(nil), // 8: GourmetGetRandUserReq + (*GourmetGetRandUserResp)(nil), // 9: GourmetGetRandUserResp + (*DBGourmet)(nil), // 10: DBGourmet + (*OrderCook)(nil), // 11: OrderCook + (*DBUser)(nil), // 12: DBUser } var file_gourmet_gourmet_msg_proto_depIdxs = []int32{ - 8, // 0: GourmetGetListResp.data:type_name -> DBGourmet - 9, // 1: GourmetCreateOrderReq.order:type_name -> OrderCook - 8, // 2: GourmetCreateOrderResp.data:type_name -> DBGourmet - 8, // 3: GourmetGetRewardResp.data:type_name -> DBGourmet - 8, // 4: GourmetSkillLvResp.data:type_name -> DBGourmet - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 10, // 0: GourmetGetListResp.data:type_name -> DBGourmet + 11, // 1: GourmetCreateOrderReq.order:type_name -> OrderCook + 10, // 2: GourmetCreateOrderResp.data:type_name -> DBGourmet + 10, // 3: GourmetGetRewardResp.data:type_name -> DBGourmet + 10, // 4: GourmetSkillLvResp.data:type_name -> DBGourmet + 12, // 5: GourmetGetRandUserResp.user:type_name -> DBUser + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_gourmet_gourmet_msg_proto_init() } @@ -460,6 +566,7 @@ func file_gourmet_gourmet_msg_proto_init() { return } file_gourmet_gourmet_db_proto_init() + file_user_user_db_proto_init() if !protoimpl.UnsafeEnabled { file_gourmet_gourmet_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GourmetGetListReq); i { @@ -557,6 +664,30 @@ func file_gourmet_gourmet_msg_proto_init() { return nil } } + file_gourmet_gourmet_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GourmetGetRandUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gourmet_gourmet_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GourmetGetRandUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -564,7 +695,7 @@ func file_gourmet_gourmet_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gourmet_gourmet_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/smithy_msg.pb.go b/pb/smithy_msg.pb.go index 668b38508..eea3ee1fa 100644 --- a/pb/smithy_msg.pb.go +++ b/pb/smithy_msg.pb.go @@ -473,6 +473,8 @@ type SmithyGetRandUserReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + People int32 `protobuf:"varint,1,opt,name=people,proto3" json:"people"` //人数 } func (x *SmithyGetRandUserReq) Reset() { @@ -507,12 +509,19 @@ func (*SmithyGetRandUserReq) Descriptor() ([]byte, []int) { return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{10} } +func (x *SmithyGetRandUserReq) GetPeople() int32 { + if x != nil { + return x.People + } + return 0 +} + type SmithyGetRandUserResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User []string `protobuf:"bytes,1,rep,name=user,proto3" json:"user"` + User []*DBUser `protobuf:"bytes,1,rep,name=user,proto3" json:"user"` } func (x *SmithyGetRandUserResp) Reset() { @@ -547,7 +556,7 @@ func (*SmithyGetRandUserResp) Descriptor() ([]byte, []int) { return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{11} } -func (x *SmithyGetRandUserResp) GetUser() []string { +func (x *SmithyGetRandUserResp) GetUser() []*DBUser { if x != nil { return x.User } @@ -560,40 +569,43 @@ var file_smithy_smithy_msg_proto_rawDesc = []byte{ 0x0a, 0x17, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2f, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2f, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, - 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, - 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x14, 0x53, 0x6d, 0x69, - 0x74, 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, + 0x6f, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x62, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, + 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x53, 0x6d, 0x69, + 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, + 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, + 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, + 0x67, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x14, 0x0a, 0x12, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x14, 0x0a, 0x12, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, - 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x15, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, - 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, - 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x22, 0x37, 0x0a, - 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, - 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, - 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x22, 0x2b, - 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, + 0x71, 0x22, 0x37, 0x0a, 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, + 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x53, 0x6d, + 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x22, 0x34, 0x0a, 0x15, 0x53, 0x6d, + 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -624,6 +636,7 @@ var file_smithy_smithy_msg_proto_goTypes = []interface{}{ (*SmithyGetRandUserResp)(nil), // 11: SmithyGetRandUserResp (*DBSmithy)(nil), // 12: DBSmithy (*OrderClang)(nil), // 13: OrderClang + (*DBUser)(nil), // 14: DBUser } var file_smithy_smithy_msg_proto_depIdxs = []int32{ 12, // 0: SmithyGetListResp.data:type_name -> DBSmithy @@ -632,11 +645,12 @@ var file_smithy_smithy_msg_proto_depIdxs = []int32{ 12, // 3: SmithyGetRewardResp.data:type_name -> DBSmithy 12, // 4: SmithyDeskSkillLvResp.data:type_name -> DBSmithy 12, // 5: SmithyStoveSkillLvResp.data:type_name -> DBSmithy - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 14, // 6: SmithyGetRandUserResp.user:type_name -> DBUser + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_smithy_smithy_msg_proto_init() } @@ -645,6 +659,7 @@ func file_smithy_smithy_msg_proto_init() { return } file_smithy_smithy_db_proto_init() + file_user_user_db_proto_init() if !protoimpl.UnsafeEnabled { file_smithy_smithy_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SmithyGetListReq); i {