diff --git a/modules/pay/api_activitybuy.go b/modules/pay/api_activitybuy.go new file mode 100644 index 000000000..abc547080 --- /dev/null +++ b/modules/pay/api_activitybuy.go @@ -0,0 +1,79 @@ +package pay + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +// 参数校验 +func (this *apiComp) ActivityBuyCheck(session comm.IUserSession, req *pb.PayActivityBuyReq) (errdata *pb.ErrorData) { + if req.Id == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + return + } + return +} + +// /获取系统公告 +func (this *apiComp) ActivityBuy(session comm.IUserSession, req *pb.PayActivityBuyReq) (errdata *pb.ErrorData) { + var ( + info *pb.DBActivityGiftbag + conf *cfg.GamePayGiftpackData + items []*pb.UserAssets + buynum, totalbuy int32 + err error + ) + if errdata = this.ActivityBuyCheck(session, req); errdata != nil { + return + } + if conf, err = this.module.configure.getPayGiftpackeData(req.Id); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + if info, err = this.module.modelActivity.getUserActivitys(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + if info.Activitys[conf.Type] == nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_PayBuyNumNotEnough, + Title: pb.ErrorCode_PayBuyNumNotEnough.ToString(), + Message: err.Error(), + } + return + } + buynum = info.Activitys[conf.Type].Items[conf.Id].Buyunm + totalbuy = info.Activitys[conf.Type].Items[conf.Id].Totalbuynum + if conf.RepeatNum >= totalbuy || conf.BuyNum >= 0 && buynum >= conf.BuyNum { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_PayBuyNumNotEnough, + Title: pb.ErrorCode_PayBuyNumNotEnough.ToString(), + Message: err.Error(), + } + return + } + if len(conf.Costitem) > 0 { + if errdata = this.module.ConsumeRes(session, conf.Costitem, true); errdata != nil { + return + } + } + + if errdata, items = this.module.modelActivity.delivery(session, conf.Packagetype); errdata != nil { + return + } + + session.SendMsg(string(this.module.GetType()), "activitybuy", &pb.PayDailyBuyResp{Isucc: true, Items: items}) + return +} diff --git a/modules/pay/api_getactivity.go b/modules/pay/api_getactivity.go index 9de3570b9..ba7570fc3 100644 --- a/modules/pay/api_getactivity.go +++ b/modules/pay/api_getactivity.go @@ -4,6 +4,9 @@ import ( "fmt" "go_dreamfactory/comm" "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" + cfg "go_dreamfactory/sys/configure/structs" + "time" ) // 参数校验 @@ -17,6 +20,7 @@ func (this *apiComp) GetActivity(session comm.IUserSession, req *pb.PayGetActivi var ( activitys *pb.DBActivityGiftbag info *pb.ActivityGiftbagItem + conf *cfg.GamePayGiftpackData otime int64 err error ok bool @@ -43,13 +47,29 @@ func (this *apiComp) GetActivity(session comm.IUserSession, req *pb.PayGetActivi } if info, ok = activitys.Activitys[req.Atype]; !ok { - info = &pb.ActivityGiftbagItem{} + info = &pb.ActivityGiftbagItem{ + Items: make(map[int32]*pb.PayActivityGiftbagItem), + } activitys.Activitys[req.Atype] = info } if info.Opentime != otime { info.Opentime = otime - info.Items = make(map[int32]*pb.PayDailyItem) + + for _, v := range info.Items { + if conf, err = this.module.configure.getPayGiftpackeData(v.Id); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + if configure.Now().Sub(time.Unix(v.Lastrefresh, 0)).Hours() > 24*float64(conf.Refreshtime) { + v.Buyunm = 0 + v.Lastrefresh = configure.Now().Unix() + } + } if err = this.module.modelActivity.updateActivitys(session.GetUserId(), activitys); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, diff --git a/modules/pay/configure.go b/modules/pay/configure.go index e1db0006e..029b1bed9 100644 --- a/modules/pay/configure.go +++ b/modules/pay/configure.go @@ -106,6 +106,25 @@ func (this *configureComp) getPayPackageDataByPid(pid string) (result *cfg.GameP return } +// 获取手动加入频道 任务限制 +func (this *configureComp) getPayGiftpackeData(id int32) (result *cfg.GamePayGiftpackData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_paygiftpack); err != nil { + this.module.Errorf("err:%v", err) + return + } else { + if result, ok = v.(*cfg.GamePayGiftpack).GetDataMap()[id]; !ok { + err = fmt.Errorf("getGameRecharge on found %d", id) + this.module.Errorf("err:%v", err) + return + } + } + return +} + // 獲取 func (this *configureComp) getPayGiftpackDataByPid(pid string) (result *cfg.GamePayGiftpackData, err error) { var ( diff --git a/modules/pay/modelActivity.go b/modules/pay/modelActivity.go index 607e7111b..0ea2a8104 100644 --- a/modules/pay/modelActivity.go +++ b/modules/pay/modelActivity.go @@ -108,18 +108,19 @@ func (this *modelActivityComp) delivery(session comm.IUserSession, pid string) ( if item, ok = info.Activitys[conf.Type]; !ok { item = &pb.ActivityGiftbagItem{ Opentime: 0, - Items: make(map[int32]*pb.PayDailyItem), + Items: make(map[int32]*pb.PayActivityGiftbagItem), } info.Activitys[conf.Type] = item } if _, ok = item.Items[conf.Id]; ok { - item.Items[conf.Id] = &pb.PayDailyItem{ + item.Items[conf.Id] = &pb.PayActivityGiftbagItem{ Id: conf.Id, } return } item.Items[conf.Id].Buyunm++ + item.Items[conf.Id].Totalbuynum++ if err = this.updateActivitys(session.GetUserId(), info); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, diff --git a/pb/pay_db.pb.go b/pb/pay_db.pb.go index b9a606c5a..93c6cfcca 100644 --- a/pb/pay_db.pb.go +++ b/pb/pay_db.pb.go @@ -338,8 +338,8 @@ type ActivityGiftbagItem struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Opentime int64 `protobuf:"varint,1,opt,name=opentime,proto3" json:"opentime"` - Items map[int32]*PayDailyItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //商品购买次数 + Opentime int64 `protobuf:"varint,1,opt,name=opentime,proto3" json:"opentime"` + Items map[int32]*PayActivityGiftbagItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //商品购买次数 } func (x *ActivityGiftbagItem) Reset() { @@ -381,13 +381,85 @@ func (x *ActivityGiftbagItem) GetOpentime() int64 { return 0 } -func (x *ActivityGiftbagItem) GetItems() map[int32]*PayDailyItem { +func (x *ActivityGiftbagItem) GetItems() map[int32]*PayActivityGiftbagItem { if x != nil { return x.Items } return nil } +//每日商城商品数据 +type PayActivityGiftbagItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` //礼包id + Buyunm int32 `protobuf:"varint,2,opt,name=buyunm,proto3" json:"buyunm"` //刷新周期内的购买次数 + Totalbuynum int32 `protobuf:"varint,3,opt,name=totalbuynum,proto3" json:"totalbuynum"` //活动期间类购买的次数 + Lastrefresh int64 `protobuf:"varint,4,opt,name=lastrefresh,proto3" json:"lastrefresh"` //上次刷新时间 +} + +func (x *PayActivityGiftbagItem) Reset() { + *x = PayActivityGiftbagItem{} + if protoimpl.UnsafeEnabled { + mi := &file_pay_pay_db_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayActivityGiftbagItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayActivityGiftbagItem) ProtoMessage() {} + +func (x *PayActivityGiftbagItem) ProtoReflect() protoreflect.Message { + mi := &file_pay_pay_db_proto_msgTypes[6] + 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 PayActivityGiftbagItem.ProtoReflect.Descriptor instead. +func (*PayActivityGiftbagItem) Descriptor() ([]byte, []int) { + return file_pay_pay_db_proto_rawDescGZIP(), []int{6} +} + +func (x *PayActivityGiftbagItem) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *PayActivityGiftbagItem) GetBuyunm() int32 { + if x != nil { + return x.Buyunm + } + return 0 +} + +func (x *PayActivityGiftbagItem) GetTotalbuynum() int32 { + if x != nil { + return x.Totalbuynum + } + return 0 +} + +func (x *PayActivityGiftbagItem) GetLastrefresh() int64 { + if x != nil { + return x.Lastrefresh + } + return 0 +} + var File_pay_pay_db_proto protoreflect.FileDescriptor var file_pay_pay_db_proto_rawDesc = []byte{ @@ -435,19 +507,28 @@ var file_pay_pay_db_proto_rawDesc = []byte{ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb1, 0x01, 0x0a, 0x13, 0x41, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x13, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x47, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x51, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x61, 0x79, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x49, - 0x74, 0x65, 0x6d, 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, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x50, 0x61, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x01, 0x0a, 0x16, 0x50, 0x61, 0x79, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, + 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x79, 0x75, 0x6e, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x79, 0x75, 0x6e, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x62, 0x75, 0x79, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x62, 0x75, 0x79, 0x6e, 0x75, 0x6d, 0x12, 0x20, 0x0a, + 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -462,32 +543,33 @@ 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, 10) +var file_pay_pay_db_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_pay_pay_db_proto_goTypes = []interface{}{ - (*DBPayOrder)(nil), // 0: DBPayOrder - (*DBUserPay)(nil), // 1: DBUserPay - (*PayDailyItem)(nil), // 2: PayDailyItem - (*DBPayDaily)(nil), // 3: DBPayDaily - (*DBActivityGiftbag)(nil), // 4: DBActivityGiftbag - (*ActivityGiftbagItem)(nil), // 5: ActivityGiftbagItem - nil, // 6: DBUserPay.RecordEntry - nil, // 7: DBPayDaily.ItemsEntry - nil, // 8: DBActivityGiftbag.ActivitysEntry - nil, // 9: ActivityGiftbagItem.ItemsEntry + (*DBPayOrder)(nil), // 0: DBPayOrder + (*DBUserPay)(nil), // 1: DBUserPay + (*PayDailyItem)(nil), // 2: PayDailyItem + (*DBPayDaily)(nil), // 3: DBPayDaily + (*DBActivityGiftbag)(nil), // 4: DBActivityGiftbag + (*ActivityGiftbagItem)(nil), // 5: ActivityGiftbagItem + (*PayActivityGiftbagItem)(nil), // 6: PayActivityGiftbagItem + nil, // 7: DBUserPay.RecordEntry + nil, // 8: DBPayDaily.ItemsEntry + nil, // 9: DBActivityGiftbag.ActivitysEntry + nil, // 10: ActivityGiftbagItem.ItemsEntry } var file_pay_pay_db_proto_depIdxs = []int32{ - 6, // 0: DBUserPay.record:type_name -> DBUserPay.RecordEntry - 7, // 1: DBPayDaily.items:type_name -> DBPayDaily.ItemsEntry - 8, // 2: DBActivityGiftbag.activitys:type_name -> DBActivityGiftbag.ActivitysEntry - 9, // 3: ActivityGiftbagItem.items:type_name -> ActivityGiftbagItem.ItemsEntry - 2, // 4: DBPayDaily.ItemsEntry.value:type_name -> PayDailyItem - 5, // 5: DBActivityGiftbag.ActivitysEntry.value:type_name -> ActivityGiftbagItem - 2, // 6: ActivityGiftbagItem.ItemsEntry.value:type_name -> PayDailyItem - 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 + 7, // 0: DBUserPay.record:type_name -> DBUserPay.RecordEntry + 8, // 1: DBPayDaily.items:type_name -> DBPayDaily.ItemsEntry + 9, // 2: DBActivityGiftbag.activitys:type_name -> DBActivityGiftbag.ActivitysEntry + 10, // 3: ActivityGiftbagItem.items:type_name -> ActivityGiftbagItem.ItemsEntry + 2, // 4: DBPayDaily.ItemsEntry.value:type_name -> PayDailyItem + 5, // 5: DBActivityGiftbag.ActivitysEntry.value:type_name -> ActivityGiftbagItem + 6, // 6: ActivityGiftbagItem.ItemsEntry.value:type_name -> PayActivityGiftbagItem + 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_pay_pay_db_proto_init() } @@ -568,6 +650,18 @@ func file_pay_pay_db_proto_init() { return nil } } + file_pay_pay_db_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayActivityGiftbagItem); 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{ @@ -575,7 +669,7 @@ func file_pay_pay_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pay_pay_db_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/pay_msg.pb.go b/pb/pay_msg.pb.go index 492d6ae2b..b1f5bbd06 100644 --- a/pb/pay_msg.pb.go +++ b/pb/pay_msg.pb.go @@ -607,6 +607,109 @@ func (x *PayGetActivityResp) GetInfo() *ActivityGiftbagItem { return nil } +// 获取礼包信息 +type PayActivityBuyReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` +} + +func (x *PayActivityBuyReq) Reset() { + *x = PayActivityBuyReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pay_pay_msg_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayActivityBuyReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayActivityBuyReq) ProtoMessage() {} + +func (x *PayActivityBuyReq) ProtoReflect() protoreflect.Message { + mi := &file_pay_pay_msg_proto_msgTypes[11] + 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 PayActivityBuyReq.ProtoReflect.Descriptor instead. +func (*PayActivityBuyReq) Descriptor() ([]byte, []int) { + return file_pay_pay_msg_proto_rawDescGZIP(), []int{11} +} + +func (x *PayActivityBuyReq) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +type PayActivityResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Isucc bool `protobuf:"varint,1,opt,name=isucc,proto3" json:"isucc"` + Items []*UserAssets `protobuf:"bytes,2,rep,name=items,proto3" json:"items"` +} + +func (x *PayActivityResp) Reset() { + *x = PayActivityResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pay_pay_msg_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayActivityResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayActivityResp) ProtoMessage() {} + +func (x *PayActivityResp) ProtoReflect() protoreflect.Message { + mi := &file_pay_pay_msg_proto_msgTypes[12] + 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 PayActivityResp.ProtoReflect.Descriptor instead. +func (*PayActivityResp) Descriptor() ([]byte, []int) { + return file_pay_pay_msg_proto_rawDescGZIP(), []int{12} +} + +func (x *PayActivityResp) GetIsucc() bool { + if x != nil { + return x.Isucc + } + return false +} + +func (x *PayActivityResp) GetItems() []*UserAssets { + if x != nil { + return x.Items + } + return nil +} + var File_pay_pay_msg_proto protoreflect.FileDescriptor var file_pay_pay_msg_proto_rawDesc = []byte{ @@ -657,8 +760,15 @@ var file_pay_pay_msg_proto_rawDesc = []byte{ 0x3e, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, - 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, + 0x23, 0x0a, 0x11, 0x50, 0x61, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x42, 0x75, + 0x79, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x4a, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x75, 0x63, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x75, 0x63, 0x63, 0x12, 0x21, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -673,7 +783,7 @@ func file_pay_pay_msg_proto_rawDescGZIP() []byte { return file_pay_pay_msg_proto_rawDescData } -var file_pay_pay_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_pay_pay_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_pay_pay_msg_proto_goTypes = []interface{}{ (*PayRecordReq)(nil), // 0: PayRecordReq (*PayRecordResp)(nil), // 1: PayRecordResp @@ -686,25 +796,28 @@ var file_pay_pay_msg_proto_goTypes = []interface{}{ (*PayDeliveryResp)(nil), // 8: PayDeliveryResp (*PayGetActivityReq)(nil), // 9: PayGetActivityReq (*PayGetActivityResp)(nil), // 10: PayGetActivityResp - (*DBUserPay)(nil), // 11: DBUserPay - (*DBPayDaily)(nil), // 12: DBPayDaily - (*UserAssets)(nil), // 13: UserAssets - (ErrorCode)(0), // 14: ErrorCode - (*ActivityGiftbagItem)(nil), // 15: ActivityGiftbagItem + (*PayActivityBuyReq)(nil), // 11: PayActivityBuyReq + (*PayActivityResp)(nil), // 12: PayActivityResp + (*DBUserPay)(nil), // 13: DBUserPay + (*DBPayDaily)(nil), // 14: DBPayDaily + (*UserAssets)(nil), // 15: UserAssets + (ErrorCode)(0), // 16: ErrorCode + (*ActivityGiftbagItem)(nil), // 17: ActivityGiftbagItem } var file_pay_pay_msg_proto_depIdxs = []int32{ - 11, // 0: PayRecordResp.info:type_name -> DBUserPay - 12, // 1: PayInfoResp.info:type_name -> DBPayDaily - 13, // 2: PayDailyBuyResp.items:type_name -> UserAssets - 13, // 3: PayShippedPush.items:type_name -> UserAssets - 11, // 4: PayShippedPush.info:type_name -> DBUserPay - 14, // 5: PayDeliveryResp.code:type_name -> ErrorCode - 15, // 6: PayGetActivityResp.info:type_name -> ActivityGiftbagItem - 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 + 13, // 0: PayRecordResp.info:type_name -> DBUserPay + 14, // 1: PayInfoResp.info:type_name -> DBPayDaily + 15, // 2: PayDailyBuyResp.items:type_name -> UserAssets + 15, // 3: PayShippedPush.items:type_name -> UserAssets + 13, // 4: PayShippedPush.info:type_name -> DBUserPay + 16, // 5: PayDeliveryResp.code:type_name -> ErrorCode + 17, // 6: PayGetActivityResp.info:type_name -> ActivityGiftbagItem + 15, // 7: PayActivityResp.items:type_name -> UserAssets + 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 + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_pay_pay_msg_proto_init() } @@ -848,6 +961,30 @@ func file_pay_pay_msg_proto_init() { return nil } } + file_pay_pay_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayActivityBuyReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pay_pay_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayActivityResp); 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{ @@ -855,7 +992,7 @@ func file_pay_pay_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pay_pay_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 13, NumExtensions: 0, NumServices: 0, },