From 5f2576bed699609d5456da391fee68e3604bf0a4 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Wed, 9 Aug 2023 16:34:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=B4=AF=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/addrecharge/api_receiveall.go | 2 +- pb/addrecharge_msg.pb.go | 50 ++++++++++++++++++--------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/modules/addrecharge/api_receiveall.go b/modules/addrecharge/api_receiveall.go index acde03c02..a7be3f2d3 100644 --- a/modules/addrecharge/api_receiveall.go +++ b/modules/addrecharge/api_receiveall.go @@ -77,6 +77,6 @@ func (this *apiComp) ReceiveAll(session comm.IUserSession, req *pb.AddRechargeRe this.module.modelRecharge.Change(session.GetUserId(), map[string]interface{}{ "record": info.Record, }) - session.SendMsg(string(this.module.GetType()), "receiveall", &pb.AddRechargeReceiveAllResp{Award: award}) + session.SendMsg(string(this.module.GetType()), "receiveall", &pb.AddRechargeReceiveAllResp{Record: info.Record, Award: award}) return } diff --git a/pb/addrecharge_msg.pb.go b/pb/addrecharge_msg.pb.go index 83183b656..43bee45ca 100644 --- a/pb/addrecharge_msg.pb.go +++ b/pb/addrecharge_msg.pb.go @@ -264,7 +264,8 @@ type AddRechargeReceiveAllResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Award []*UserAssets `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //奖励 + Record map[int32]bool `protobuf:"bytes,1,rep,name=record,proto3" json:"record" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Award []*UserAssets `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //奖励 } func (x *AddRechargeReceiveAllResp) Reset() { @@ -299,6 +300,13 @@ func (*AddRechargeReceiveAllResp) Descriptor() ([]byte, []int) { return file_addrecharge_addrecharge_msg_proto_rawDescGZIP(), []int{5} } +func (x *AddRechargeReceiveAllResp) GetRecord() map[int32]bool { + if x != nil { + return x.Record + } + return nil +} + func (x *AddRechargeReceiveAllResp) GetAward() []*UserAssets { if x != nil { return x.Award @@ -333,11 +341,19 @@ var file_addrecharge_addrecharge_msg_proto_rawDesc = []byte{ 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, - 0x22, 0x3e, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, - 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0xb9, 0x01, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, + 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x21, + 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, + 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 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 ( @@ -352,7 +368,7 @@ func file_addrecharge_addrecharge_msg_proto_rawDescGZIP() []byte { return file_addrecharge_addrecharge_msg_proto_rawDescData } -var file_addrecharge_addrecharge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_addrecharge_addrecharge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_addrecharge_addrecharge_msg_proto_goTypes = []interface{}{ (*AddRechargeInfoReq)(nil), // 0: AddRechargeInfoReq (*AddRechargeInfoResp)(nil), // 1: AddRechargeInfoResp @@ -361,17 +377,19 @@ var file_addrecharge_addrecharge_msg_proto_goTypes = []interface{}{ (*AddRechargeReceiveAllReq)(nil), // 4: AddRechargeReceiveAllReq (*AddRechargeReceiveAllResp)(nil), // 5: AddRechargeReceiveAllResp nil, // 6: AddRechargeInfoResp.RecordEntry - (*UserAssets)(nil), // 7: UserAssets + nil, // 7: AddRechargeReceiveAllResp.RecordEntry + (*UserAssets)(nil), // 8: UserAssets } var file_addrecharge_addrecharge_msg_proto_depIdxs = []int32{ 6, // 0: AddRechargeInfoResp.record:type_name -> AddRechargeInfoResp.RecordEntry - 7, // 1: AddRechargeReceiveResp.award:type_name -> UserAssets - 7, // 2: AddRechargeReceiveAllResp.award:type_name -> UserAssets - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 8, // 1: AddRechargeReceiveResp.award:type_name -> UserAssets + 7, // 2: AddRechargeReceiveAllResp.record:type_name -> AddRechargeReceiveAllResp.RecordEntry + 8, // 3: AddRechargeReceiveAllResp.award:type_name -> UserAssets + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_addrecharge_addrecharge_msg_proto_init() } @@ -460,7 +478,7 @@ func file_addrecharge_addrecharge_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_addrecharge_addrecharge_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, },