diff --git a/bin/json/game_recharge.json b/bin/json/game_recharge.json index 47ddbea96..9a308abd5 100644 --- a/bin/json/game_recharge.json +++ b/bin/json/game_recharge.json @@ -1,6 +1,6 @@ [ { - "id": 1, + "id": "1", "editionid": "debug", "recharge_type": 1, "monetaryunit": "¥", @@ -15,7 +15,7 @@ "image": "" }, { - "id": 2, + "id": "2", "editionid": "debug", "recharge_type": 1, "monetaryunit": "¥", @@ -30,7 +30,7 @@ "image": "" }, { - "id": 3, + "id": "3", "editionid": "debug", "recharge_type": 1, "monetaryunit": "¥", @@ -45,7 +45,7 @@ "image": "" }, { - "id": 4, + "id": "4", "editionid": "debug", "recharge_type": 1, "monetaryunit": "¥", @@ -60,7 +60,7 @@ "image": "" }, { - "id": 5, + "id": "5", "editionid": "debug", "recharge_type": 1, "monetaryunit": "¥", @@ -75,7 +75,7 @@ "image": "" }, { - "id": 6, + "id": "6", "editionid": "debug", "recharge_type": 1, "monetaryunit": "¥", @@ -90,7 +90,7 @@ "image": "" }, { - "id": 7, + "id": "7", "editionid": "debug", "recharge_type": 1, "monetaryunit": "¥", @@ -105,7 +105,7 @@ "image": "" }, { - "id": 8, + "id": "8", "editionid": "debug", "recharge_type": 1, "monetaryunit": "¥", @@ -120,7 +120,7 @@ "image": "" }, { - "id": 9, + "id": "9", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -135,7 +135,7 @@ "image": "" }, { - "id": 10, + "id": "10", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -150,7 +150,7 @@ "image": "" }, { - "id": 11, + "id": "11", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -165,7 +165,7 @@ "image": "" }, { - "id": 12, + "id": "12", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -180,7 +180,7 @@ "image": "" }, { - "id": 13, + "id": "13", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -195,7 +195,7 @@ "image": "" }, { - "id": 14, + "id": "14", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -210,7 +210,7 @@ "image": "" }, { - "id": 15, + "id": "15", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -225,7 +225,7 @@ "image": "" }, { - "id": 16, + "id": "16", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -240,7 +240,7 @@ "image": "" }, { - "id": 17, + "id": "17", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -255,7 +255,7 @@ "image": "" }, { - "id": 18, + "id": "18", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", @@ -270,7 +270,7 @@ "image": "" }, { - "id": 19, + "id": "19", "editionid": "debug", "recharge_type": 2, "monetaryunit": "¥", diff --git a/comm/const.go b/comm/const.go index 21b9e34f8..f62ede0c4 100644 --- a/comm/const.go +++ b/comm/const.go @@ -178,8 +178,9 @@ const ( TableSociatyLog = "sociatylog" ///充值数据表 - TablePay = "pay" - + TablePay = "payorder" + ///充值数据表 + TablePayUser = "payuser" // 巨怪列车收益记录 TableTrollRecord = "trollrecord" ) @@ -262,11 +263,12 @@ const ( const ( ResGold = "gold" //金币 ResExp = "exp" //经验 + VipExp = "vipexp" //经验 ResDiamond = "diamond" //钻石 ResTaskActive = "taskActive" //任务活跃度 ResFriend = "friendPoint" //友情点 + StarCoin = "starcoin" //星座币 ) - const ( Gold int32 = 1 //金币 Diamond int32 = 2 //钻石 diff --git a/modules/pay/configure.go b/modules/pay/configure.go index 46a8297c4..d1bce8e7d 100644 --- a/modules/pay/configure.go +++ b/modules/pay/configure.go @@ -1,11 +1,15 @@ package pay import ( + "fmt" "go_dreamfactory/lego/core" "go_dreamfactory/modules" + cfg "go_dreamfactory/sys/configure/structs" ) -const () +const ( + game_recharge = "game_recharge.json" +) ///背包配置管理组件 type configureComp struct { @@ -17,6 +21,25 @@ type configureComp struct { func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { this.MCompConfigure.Init(service, module, comp, options) this.module = module.(*Pay) - + this.LoadConfigure(game_recharge, cfg.NewGameRecharge) + return +} + +//获取手动加入频道 任务限制 +func (this *configureComp) getGameRecharge(id string) (result *cfg.GameRechargeData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_recharge); err != nil { + this.module.Errorf("err:%v", err) + return + } else { + if result, ok = v.(*cfg.GameRecharge).GetDataMap()[id]; !ok { + err = fmt.Errorf("getGameRecharge on found %d", id) + this.module.Errorf("err:%v", err) + return + } + } return } diff --git a/modules/pay/modelPay.go b/modules/pay/modelPay.go index b8b661714..20149bef7 100644 --- a/modules/pay/modelPay.go +++ b/modules/pay/modelPay.go @@ -12,13 +12,13 @@ import ( ) ///论坛 数据组件 -type modelShopComp struct { +type modelPayComp struct { modules.MCompModel module *Pay } //组件初始化接口 -func (this *modelShopComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { +func (this *modelPayComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { this.MCompModel.Init(service, module, comp, opt) this.module = module.(*Pay) this.TableName = comm.TablePay @@ -29,12 +29,14 @@ func (this *modelShopComp) Init(service core.IService, module core.IModule, comp return } -//查询用户装备数据 -func (this *modelShopComp) QueryUserShopData(uId string) (data *pb.DBShop, err error) { - data = &pb.DBShop{} - if err = this.Get(uId, data); err != nil && err != mgo.MongodbNil { +//查询用户重置数据 +func (this *modelPayComp) queryUserShopData(uId string) (result []*pb.DBPayOrder, err error) { + result = make([]*pb.DBPayOrder, 0) + if err = this.GetList(uId, &result); err != nil && err != mgo.MongodbNil { this.module.Errorf("err:%v", err) } - err = nil + if err == mgo.MongodbNil { + err = nil + } return } diff --git a/modules/pay/modelUser.go b/modules/pay/modelUser.go new file mode 100644 index 000000000..663c5d996 --- /dev/null +++ b/modules/pay/modelUser.go @@ -0,0 +1,42 @@ +package pay + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +///论坛 数据组件 +type modelUserComp struct { + modules.MCompModel + module *Pay +} + +//组件初始化接口 +func (this *modelUserComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { + this.MCompModel.Init(service, module, comp, opt) + this.module = module.(*Pay) + this.TableName = comm.TablePayUser + //创建uid索引 + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +//查询用户重置数据 +func (this *modelUserComp) queryUserData(uId string) (result *pb.DBPayUser, err error) { + result = &pb.DBPayUser{} + if err = this.Get(uId, result); err != nil && err != mgo.MongodbNil { + this.module.Errorf("err:%v", err) + } + if err == mgo.MongodbNil { + err = nil + } + return +} diff --git a/modules/pay/module.go b/modules/pay/module.go index 284ac4e33..af7af32f0 100644 --- a/modules/pay/module.go +++ b/modules/pay/module.go @@ -8,6 +8,7 @@ import ( "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" ) /* @@ -23,6 +24,7 @@ func NewModule() core.IModule { type Pay struct { modules.ModuleBase service base.IRPCXService + modelUser *modelUserComp configure *configureComp } @@ -46,13 +48,50 @@ func (this *Pay) Start() (err error) { //装备组件 func (this *Pay) OnInstallComp() { this.ModuleBase.OnInstallComp() + this.modelUser = this.RegisterComp(new(modelUserComp)).(*modelUserComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } //RPC----------------------------------------------------------------------------------------------------------------------- func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDeliveryReq, reply *pb.PayDeliveryResp) (err error) { this.Debug("Rpc_ModulePayDelivery", log.Field{Key: "args", Value: args.String()}) - + var ( + conf *cfg.GameRechargeData + user *pb.DBPayUser + res []*cfg.Gameatn + session comm.IUserSession + online bool + ) + if conf, err = this.configure.getGameRecharge(args.Productid); err != nil { + reply.Code = pb.ErrorCode_ConfigNoFound + return + } + + if user, err = this.modelUser.queryUserData(args.Uid); err != nil { + reply.Code = pb.ErrorCode_DBError + return + } + if user.Goods[args.Productid] > 0 { + res = conf.Vipexp + } else { + res = conf.DiamondNumDouble + } + + if session, online = this.GetUserSession(args.Uid); online { + if reply.Code = this.DispenseRes(session, res, true); reply.Code != pb.ErrorCode_Success { + return + } + if err = session.Push(); err != nil { + this.Errorln(err) + return + } + } else { + session = comm.NewUserSessionByPools(this.service) + session.SetSession("", "", "", "", args.Uid) + if reply.Code = this.DispenseRes(session, res, false); reply.Code != pb.ErrorCode_Success { + return + } + } return } diff --git a/modules/user/module.go b/modules/user/module.go index 5cb057b81..d0c4b6009 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -288,6 +288,14 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha } } change.Exp += int64(add) + case comm.VipExp: + if add < 0 { + if user.Vipexp+int64(add) < 0 { + code = pb.ErrorCode_UserExpNoEnough + return + } + } + change.Vipexp += int64(add) case comm.ResDiamond: if add < 0 { if user.Diamond+int64(add) < 0 { @@ -304,6 +312,14 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha } } change.Friend += add + case comm.StarCoin: + if add < 0 { + if user.Starcoin+int64(add) < 0 { + code = pb.ErrorCode_UserFriendNoEnough + return + } + } + change.Starcoin += int64(add) default: err = errors.New(fmt.Sprintf("%s no supported", attr)) return diff --git a/pb/pay_db.pb.go b/pb/pay_db.pb.go index 771a587d2..98f85fcc7 100644 --- a/pb/pay_db.pb.go +++ b/pb/pay_db.pb.go @@ -92,6 +92,62 @@ func (x *DBPayOrder) GetCtime() int64 { return 0 } +//用户重置数据表 +type DBPayUser struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id + Goods map[string]int32 `protobuf:"bytes,2,rep,name=goods,proto3" json:"goods" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //商品购买次数 +} + +func (x *DBPayUser) Reset() { + *x = DBPayUser{} + if protoimpl.UnsafeEnabled { + mi := &file_pay_pay_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBPayUser) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBPayUser) ProtoMessage() {} + +func (x *DBPayUser) ProtoReflect() protoreflect.Message { + mi := &file_pay_pay_db_proto_msgTypes[1] + 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 DBPayUser.ProtoReflect.Descriptor instead. +func (*DBPayUser) Descriptor() ([]byte, []int) { + return file_pay_pay_db_proto_rawDescGZIP(), []int{1} +} + +func (x *DBPayUser) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBPayUser) GetGoods() map[string]int32 { + if x != nil { + return x.Goods + } + return nil +} + var File_pay_pay_db_proto protoreflect.FileDescriptor var file_pay_pay_db_proto_rawDesc = []byte{ @@ -103,7 +159,16 @@ var file_pay_pay_db_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x84, 0x01, 0x0a, 0x09, 0x44, 0x42, 0x50, 0x61, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x2b, 0x0a, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x79, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x64, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x1a, 0x38, 0x0a, + 0x0a, 0x47, 0x6f, 0x6f, 0x64, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -118,16 +183,19 @@ func file_pay_pay_db_proto_rawDescGZIP() []byte { return file_pay_pay_db_proto_rawDescData } -var file_pay_pay_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_pay_pay_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_pay_pay_db_proto_goTypes = []interface{}{ (*DBPayOrder)(nil), // 0: DBPayOrder + (*DBPayUser)(nil), // 1: DBPayUser + nil, // 2: DBPayUser.GoodsEntry } var file_pay_pay_db_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 + 2, // 0: DBPayUser.goods:type_name -> DBPayUser.GoodsEntry + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_pay_pay_db_proto_init() } @@ -148,6 +216,18 @@ func file_pay_pay_db_proto_init() { return nil } } + file_pay_pay_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBPayUser); 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{ @@ -155,7 +235,7 @@ func file_pay_pay_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pay_pay_db_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index def3b0c33..d154456e2 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -117,14 +117,16 @@ type DBUser struct { Avatar string `protobuf:"bytes,12,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像 Gold int64 `protobuf:"varint,13,opt,name=gold,proto3" json:"gold" bson:"gold"` //金币 Exp int64 `protobuf:"varint,14,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验 - Created bool `protobuf:"varint,15,opt,name=created,proto3" json:"created" bson:"created"` //创角 - Lv int32 `protobuf:"varint,16,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级 - Vip int32 `protobuf:"varint,17,opt,name=vip,proto3" json:"vip" bson:"vip"` // vip - Diamond int64 `protobuf:"varint,18,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石 - 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 string `protobuf:"bytes,21,opt,name=bgp,proto3" json:"bgp" bson:"bgp"` //背景 + Vipexp int64 `protobuf:"varint,15,opt,name=vipexp,proto3" json:"vipexp" bson:"vipexp"` //vip经验 + Starcoin int64 `protobuf:"varint,16,opt,name=starcoin,proto3" json:"starcoin" bson:"starcoin"` //星座图币 + Created bool `protobuf:"varint,17,opt,name=created,proto3" json:"created" bson:"created"` //创角 + Lv int32 `protobuf:"varint,18,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级 + Vip int32 `protobuf:"varint,19,opt,name=vip,proto3" json:"vip" bson:"vip"` // vip + Diamond int64 `protobuf:"varint,20,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石 + Title int32 `protobuf:"varint,21,opt,name=title,proto3" json:"title"` //@go_tags(`bson:"title"`)头衔 + Offlinetime int64 `protobuf:"varint,22,opt,name=offlinetime,proto3" json:"offlinetime" bson:"offlinetime"` //离线时间 + Figure int32 `protobuf:"varint,23,opt,name=figure,proto3" json:"figure" bson:"figure"` //主角形象 + Bgp string `protobuf:"bytes,24,opt,name=bgp,proto3" json:"bgp" bson:"bgp"` //背景 } func (x *DBUser) Reset() { @@ -250,6 +252,20 @@ func (x *DBUser) GetExp() int64 { return 0 } +func (x *DBUser) GetVipexp() int64 { + if x != nil { + return x.Vipexp + } + return 0 +} + +func (x *DBUser) GetStarcoin() int64 { + if x != nil { + return x.Starcoin + } + return 0 +} + func (x *DBUser) GetCreated() bool { if x != nil { return x.Created @@ -462,8 +478,8 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x61, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0xe6, - 0x03, 0x0a, 0x06, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x9a, + 0x04, 0x0a, 0x06, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, @@ -482,40 +498,43 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x64, 0x69, - 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x13, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, - 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, - 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, 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, - 0x7a, 0x68, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, - 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x12, 0x12, 0x0a, - 0x04, 0x77, 0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x75, 0x6c, - 0x69, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, - 0x67, 0x75, 0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, - 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x61, 0x6e, - 0x73, 0x75, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x12, 0x1c, 0x0a, - 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x61, 0x69, 0x6a, - 0x69, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x16, 0x0a, 0x06, 0x76, 0x69, 0x70, 0x65, 0x78, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x76, 0x69, 0x70, 0x65, 0x78, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x63, + 0x6f, 0x69, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x63, + 0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x6c, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, + 0x03, 0x76, 0x69, 0x70, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x16, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x74, 0x69, 0x6d, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x67, 0x70, + 0x18, 0x18, 0x20, 0x01, 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, 0x7a, 0x68, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, + 0x75, 0x63, 0x68, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67, + 0x6a, 0x75, 0x63, 0x68, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, + 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, + 0x67, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x04, 0x77, 0x75, 0x6c, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62, + 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, + 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, + 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x73, 0x61, 0x69, 0x6a, 0x69, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/user_msg.pb.go b/pb/user_msg.pb.go index b59065deb..cf9c09dc3 100644 --- a/pb/user_msg.pb.go +++ b/pb/user_msg.pb.go @@ -577,10 +577,12 @@ type UserResChangedPush struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gold int64 `protobuf:"varint,1,opt,name=gold,proto3" json:"gold" bson:"gold"` //金币 - Exp int64 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验 - Diamond int64 `protobuf:"varint,5,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石 - Friend int32 `protobuf:"varint,6,opt,name=friend,proto3" json:"friend" bson:"frined"` //友情点 + Gold int64 `protobuf:"varint,1,opt,name=gold,proto3" json:"gold" bson:"gold"` //金币 + Exp int64 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验 + Vipexp int64 `protobuf:"varint,3,opt,name=vipexp,proto3" json:"vipexp" bson:"vipexp"` //经验 + Diamond int64 `protobuf:"varint,4,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石 + Friend int32 `protobuf:"varint,5,opt,name=friend,proto3" json:"friend" bson:"frined"` //友情点 + Starcoin int64 `protobuf:"varint,6,opt,name=starcoin,proto3" json:"starcoin" bson:"starcoin"` //星座币 } func (x *UserResChangedPush) Reset() { @@ -629,6 +631,13 @@ func (x *UserResChangedPush) GetExp() int64 { return 0 } +func (x *UserResChangedPush) GetVipexp() int64 { + if x != nil { + return x.Vipexp + } + return 0 +} + func (x *UserResChangedPush) GetDiamond() int64 { if x != nil { return x.Diamond @@ -643,6 +652,13 @@ func (x *UserResChangedPush) GetFriend() int32 { return 0 } +func (x *UserResChangedPush) GetStarcoin() int64 { + if x != nil { + return x.Starcoin + } + return 0 +} + //用户设置获取 type UserGetSettingReq struct { state protoimpl.MessageState @@ -2209,118 +2225,121 @@ var file_user_user_msg_proto_rawDesc = []byte{ 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, - 0x73, 0x53, 0x75, 0x63, 0x63, 0x22, 0x6c, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, - 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, - 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, - 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, - 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, - 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, - 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, - 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x22, 0x25, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, - 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 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, 0x50, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, - 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x71, 0x12, - 0x1a, 0x0a, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x14, 0x55, - 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, - 0x64, 0x22, 0x28, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x62, - 0x67, 0x70, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x11, 0x55, - 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x62, 0x67, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x73, 0x53, 0x75, 0x63, 0x63, 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, + 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, + 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x69, 0x70, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x76, 0x69, 0x70, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, + 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x64, 0x69, 0x61, + 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x74, 0x61, 0x72, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x73, 0x74, 0x61, 0x72, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, + 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, + 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, + 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, + 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, + 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, + 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x10, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, - 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, - 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x14, 0x55, - 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, - 0x64, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, - 0x61, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, - 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, - 0x72, 0x6f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, - 0x6f, 0x69, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x76, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, - 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, - 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x27, 0x0a, - 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x52, - 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x26, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, - 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xf0, 0x01, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, - 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, - 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x55, 0x73, - 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x02, 0x65, 0x78, 0x12, 0x33, 0x0a, 0x0c, - 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x12, 0x34, 0x0a, 0x0d, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, - 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x0d, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x31, 0x0a, 0x0c, 0x76, 0x69, 0x6b, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x0c, 0x76, 0x69, - 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x34, 0x0a, 0x12, 0x55, 0x73, - 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, - 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, - 0x22, 0x27, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x74, - 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x68, 0x6f, 0x77, 0x74, 0x65, 0x61, 0x6d, 0x52, 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, - 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, 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, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x47, - 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x22, - 0x3a, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x6e, 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, 0x50, 0x0a, 0x12, 0x55, + 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, + 0x13, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, + 0x22, 0x44, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x49, 0x64, 0x22, 0x28, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x62, 0x67, 0x70, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x67, + 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, + 0x22, 0x3b, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x62, 0x67, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x67, 0x70, 0x49, 0x64, 0x22, 0x31, 0x0a, + 0x13, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, + 0x22, 0x44, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x65, 0x49, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, + 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x73, + 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x11, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x76, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, + 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x6c, 0x76, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x26, 0x0a, 0x12, 0x55, + 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xf0, 0x01, 0x0a, + 0x14, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x02, 0x65, + 0x78, 0x12, 0x33, 0x0a, 0x0c, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, + 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x34, 0x0a, 0x0d, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x44, 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x0d, 0x68, + 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x31, 0x0a, 0x0c, + 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, + 0x6b, 0x52, 0x0c, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, + 0x34, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x74, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, + 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, + 0x62, 0x6a, 0x49, 0x64, 0x73, 0x22, 0x27, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x11, + 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x74, 0x65, 0x61, 0x6d, 0x52, 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, 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, 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, 0x22, 0x16, 0x0a, 0x14, + 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x22, 0x3a, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/sys/configure/structs/Game.Recharge.go b/sys/configure/structs/Game.Recharge.go index 5a86103ae..4bd64ac2e 100644 --- a/sys/configure/structs/Game.Recharge.go +++ b/sys/configure/structs/Game.Recharge.go @@ -9,13 +9,13 @@ package cfg type GameRecharge struct { - _dataMap map[int32]*GameRechargeData + _dataMap map[string]*GameRechargeData _dataList []*GameRechargeData } func NewGameRecharge(_buf []map[string]interface{}) (*GameRecharge, error) { _dataList := make([]*GameRechargeData, 0, len(_buf)) - dataMap := make(map[int32]*GameRechargeData) + dataMap := make(map[string]*GameRechargeData) for _, _ele_ := range _buf { if _v, err2 := DeserializeGameRechargeData(_ele_); err2 != nil { return nil, err2 @@ -27,7 +27,7 @@ func NewGameRecharge(_buf []map[string]interface{}) (*GameRecharge, error) { return &GameRecharge{_dataList:_dataList, _dataMap:dataMap}, nil } -func (table *GameRecharge) GetDataMap() map[int32]*GameRechargeData { +func (table *GameRecharge) GetDataMap() map[string]*GameRechargeData { return table._dataMap } @@ -35,7 +35,7 @@ func (table *GameRecharge) GetDataList() []*GameRechargeData { return table._dataList } -func (table *GameRecharge) Get(key int32) *GameRechargeData { +func (table *GameRecharge) Get(key string) *GameRechargeData { return table._dataMap[key] } diff --git a/sys/configure/structs/Game.RechargeData.go b/sys/configure/structs/Game.RechargeData.go index da55abb8e..94bc08426 100644 --- a/sys/configure/structs/Game.RechargeData.go +++ b/sys/configure/structs/Game.RechargeData.go @@ -11,16 +11,13 @@ package cfg import "errors" type GameRechargeData struct { - Id int32 + Id string Editionid string RechargeType int32 Monetaryunit string Amount string - Vipexp string - VipexpNum int32 - Diamond string - DiamondNum int32 - DiamondNumDouble int32 + Vipexp []*Gameatn + DiamondNumDouble []*Gameatn Channel string Text string Image string @@ -33,16 +30,39 @@ func (*GameRechargeData) GetTypeId() int32 { } func (_v *GameRechargeData)Deserialize(_buf map[string]interface{}) (err error) { - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } + { var _ok_ bool; if _v.Id, _ok_ = _buf["id"].(string); !_ok_ { err = errors.New("id error"); return } } { var _ok_ bool; if _v.Editionid, _ok_ = _buf["editionid"].(string); !_ok_ { err = errors.New("editionid error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["recharge_type"].(float64); !_ok_ { err = errors.New("recharge_type error"); return }; _v.RechargeType = int32(_tempNum_) } { var _ok_ bool; if _v.Monetaryunit, _ok_ = _buf["monetaryunit"].(string); !_ok_ { err = errors.New("monetaryunit error"); return } } { var _ok_ bool; if _v.Amount, _ok_ = _buf["amount"].(string); !_ok_ { err = errors.New("amount error"); return } } - { var _ok_ bool; if _v.Vipexp, _ok_ = _buf["vipexp"].(string); !_ok_ { err = errors.New("vipexp error"); return } } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["vipexp_num"].(float64); !_ok_ { err = errors.New("vipexp_num error"); return }; _v.VipexpNum = int32(_tempNum_) } - { var _ok_ bool; if _v.Diamond, _ok_ = _buf["diamond"].(string); !_ok_ { err = errors.New("diamond error"); return } } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["diamond_num"].(float64); !_ok_ { err = errors.New("diamond_num error"); return }; _v.DiamondNum = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["diamond_num_double"].(float64); !_ok_ { err = errors.New("diamond_num_double error"); return }; _v.DiamondNumDouble = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["vipexp"].([]interface{}); !_ok_ { err = errors.New("vipexp error"); return } + + _v.Vipexp = make([]*Gameatn, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } + _v.Vipexp = append(_v.Vipexp, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["diamond_num_double"].([]interface{}); !_ok_ { err = errors.New("diamond_num_double error"); return } + + _v.DiamondNumDouble = make([]*Gameatn, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } + _v.DiamondNumDouble = append(_v.DiamondNumDouble, _list_v_) + } + } + { var _ok_ bool; if _v.Channel, _ok_ = _buf["channel"].(string); !_ok_ { err = errors.New("channel error"); return } } { var _ok_ bool; if _v.Text, _ok_ = _buf["text"].(string); !_ok_ { err = errors.New("text error"); return } } { var _ok_ bool; if _v.Image, _ok_ = _buf["image"].(string); !_ok_ { err = errors.New("image error"); return } }