上传累充

This commit is contained in:
liwei 2023-08-09 16:34:40 +08:00
parent cfb6ad7b74
commit 5f2576bed6
2 changed files with 35 additions and 17 deletions

View File

@ -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
}

View File

@ -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,
},