上传充值礼包代码

This commit is contained in:
liwei 2023-07-13 16:04:09 +08:00
parent 2e4519a4d5
commit feb88b4af7
6 changed files with 408 additions and 58 deletions

View File

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

View File

@ -4,6 +4,9 @@ import (
"fmt" "fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "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 ( var (
activitys *pb.DBActivityGiftbag activitys *pb.DBActivityGiftbag
info *pb.ActivityGiftbagItem info *pb.ActivityGiftbagItem
conf *cfg.GamePayGiftpackData
otime int64 otime int64
err error err error
ok bool ok bool
@ -43,13 +47,29 @@ func (this *apiComp) GetActivity(session comm.IUserSession, req *pb.PayGetActivi
} }
if info, ok = activitys.Activitys[req.Atype]; !ok { 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 activitys.Activitys[req.Atype] = info
} }
if info.Opentime != otime { if info.Opentime != otime {
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 { if err = this.module.modelActivity.updateActivitys(session.GetUserId(), activitys); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError, Code: pb.ErrorCode_DBError,

View File

@ -106,6 +106,25 @@ func (this *configureComp) getPayPackageDataByPid(pid string) (result *cfg.GameP
return 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) { func (this *configureComp) getPayGiftpackDataByPid(pid string) (result *cfg.GamePayGiftpackData, err error) {
var ( var (

View File

@ -108,18 +108,19 @@ func (this *modelActivityComp) delivery(session comm.IUserSession, pid string) (
if item, ok = info.Activitys[conf.Type]; !ok { if item, ok = info.Activitys[conf.Type]; !ok {
item = &pb.ActivityGiftbagItem{ item = &pb.ActivityGiftbagItem{
Opentime: 0, Opentime: 0,
Items: make(map[int32]*pb.PayDailyItem), Items: make(map[int32]*pb.PayActivityGiftbagItem),
} }
info.Activitys[conf.Type] = item info.Activitys[conf.Type] = item
} }
if _, ok = item.Items[conf.Id]; ok { if _, ok = item.Items[conf.Id]; ok {
item.Items[conf.Id] = &pb.PayDailyItem{ item.Items[conf.Id] = &pb.PayActivityGiftbagItem{
Id: conf.Id, Id: conf.Id,
} }
return return
} }
item.Items[conf.Id].Buyunm++ item.Items[conf.Id].Buyunm++
item.Items[conf.Id].Totalbuynum++
if err = this.updateActivitys(session.GetUserId(), info); err != nil { if err = this.updateActivitys(session.GetUserId(), info); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError, Code: pb.ErrorCode_DBError,

View File

@ -338,8 +338,8 @@ type ActivityGiftbagItem struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Opentime int64 `protobuf:"varint,1,opt,name=opentime,proto3" json:"opentime"` 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"` //商品购买次数 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() { func (x *ActivityGiftbagItem) Reset() {
@ -381,13 +381,85 @@ func (x *ActivityGiftbagItem) GetOpentime() int64 {
return 0 return 0
} }
func (x *ActivityGiftbagItem) GetItems() map[int32]*PayDailyItem { func (x *ActivityGiftbagItem) GetItems() map[int32]*PayActivityGiftbagItem {
if x != nil { if x != nil {
return x.Items return x.Items
} }
return nil 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 protoreflect.FileDescriptor
var file_pay_pay_db_proto_rawDesc = []byte{ 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 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, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x50, 0x61, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -462,32 +543,33 @@ func file_pay_pay_db_proto_rawDescGZIP() []byte {
return file_pay_pay_db_proto_rawDescData 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{}{ var file_pay_pay_db_proto_goTypes = []interface{}{
(*DBPayOrder)(nil), // 0: DBPayOrder (*DBPayOrder)(nil), // 0: DBPayOrder
(*DBUserPay)(nil), // 1: DBUserPay (*DBUserPay)(nil), // 1: DBUserPay
(*PayDailyItem)(nil), // 2: PayDailyItem (*PayDailyItem)(nil), // 2: PayDailyItem
(*DBPayDaily)(nil), // 3: DBPayDaily (*DBPayDaily)(nil), // 3: DBPayDaily
(*DBActivityGiftbag)(nil), // 4: DBActivityGiftbag (*DBActivityGiftbag)(nil), // 4: DBActivityGiftbag
(*ActivityGiftbagItem)(nil), // 5: ActivityGiftbagItem (*ActivityGiftbagItem)(nil), // 5: ActivityGiftbagItem
nil, // 6: DBUserPay.RecordEntry (*PayActivityGiftbagItem)(nil), // 6: PayActivityGiftbagItem
nil, // 7: DBPayDaily.ItemsEntry nil, // 7: DBUserPay.RecordEntry
nil, // 8: DBActivityGiftbag.ActivitysEntry nil, // 8: DBPayDaily.ItemsEntry
nil, // 9: ActivityGiftbagItem.ItemsEntry nil, // 9: DBActivityGiftbag.ActivitysEntry
nil, // 10: ActivityGiftbagItem.ItemsEntry
} }
var file_pay_pay_db_proto_depIdxs = []int32{ var file_pay_pay_db_proto_depIdxs = []int32{
6, // 0: DBUserPay.record:type_name -> DBUserPay.RecordEntry 7, // 0: DBUserPay.record:type_name -> DBUserPay.RecordEntry
7, // 1: DBPayDaily.items:type_name -> DBPayDaily.ItemsEntry 8, // 1: DBPayDaily.items:type_name -> DBPayDaily.ItemsEntry
8, // 2: DBActivityGiftbag.activitys:type_name -> DBActivityGiftbag.ActivitysEntry 9, // 2: DBActivityGiftbag.activitys:type_name -> DBActivityGiftbag.ActivitysEntry
9, // 3: ActivityGiftbagItem.items:type_name -> ActivityGiftbagItem.ItemsEntry 10, // 3: ActivityGiftbagItem.items:type_name -> ActivityGiftbagItem.ItemsEntry
2, // 4: DBPayDaily.ItemsEntry.value:type_name -> PayDailyItem 2, // 4: DBPayDaily.ItemsEntry.value:type_name -> PayDailyItem
5, // 5: DBActivityGiftbag.ActivitysEntry.value:type_name -> ActivityGiftbagItem 5, // 5: DBActivityGiftbag.ActivitysEntry.value:type_name -> ActivityGiftbagItem
2, // 6: ActivityGiftbagItem.ItemsEntry.value:type_name -> PayDailyItem 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 output_type
7, // [7:7] is the sub-list for method input_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 type_name
7, // [7:7] is the sub-list for extension extendee 7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name 0, // [0:7] is the sub-list for field type_name
} }
func init() { file_pay_pay_db_proto_init() } func init() { file_pay_pay_db_proto_init() }
@ -568,6 +650,18 @@ func file_pay_pay_db_proto_init() {
return nil 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{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -575,7 +669,7 @@ func file_pay_pay_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pay_pay_db_proto_rawDesc, RawDescriptor: file_pay_pay_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 10, NumMessages: 11,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -607,6 +607,109 @@ func (x *PayGetActivityResp) GetInfo() *ActivityGiftbagItem {
return nil 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 protoreflect.FileDescriptor
var file_pay_pay_msg_proto_rawDesc = []byte{ 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, 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, 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, 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, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -673,7 +783,7 @@ func file_pay_pay_msg_proto_rawDescGZIP() []byte {
return file_pay_pay_msg_proto_rawDescData 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{}{ var file_pay_pay_msg_proto_goTypes = []interface{}{
(*PayRecordReq)(nil), // 0: PayRecordReq (*PayRecordReq)(nil), // 0: PayRecordReq
(*PayRecordResp)(nil), // 1: PayRecordResp (*PayRecordResp)(nil), // 1: PayRecordResp
@ -686,25 +796,28 @@ var file_pay_pay_msg_proto_goTypes = []interface{}{
(*PayDeliveryResp)(nil), // 8: PayDeliveryResp (*PayDeliveryResp)(nil), // 8: PayDeliveryResp
(*PayGetActivityReq)(nil), // 9: PayGetActivityReq (*PayGetActivityReq)(nil), // 9: PayGetActivityReq
(*PayGetActivityResp)(nil), // 10: PayGetActivityResp (*PayGetActivityResp)(nil), // 10: PayGetActivityResp
(*DBUserPay)(nil), // 11: DBUserPay (*PayActivityBuyReq)(nil), // 11: PayActivityBuyReq
(*DBPayDaily)(nil), // 12: DBPayDaily (*PayActivityResp)(nil), // 12: PayActivityResp
(*UserAssets)(nil), // 13: UserAssets (*DBUserPay)(nil), // 13: DBUserPay
(ErrorCode)(0), // 14: ErrorCode (*DBPayDaily)(nil), // 14: DBPayDaily
(*ActivityGiftbagItem)(nil), // 15: ActivityGiftbagItem (*UserAssets)(nil), // 15: UserAssets
(ErrorCode)(0), // 16: ErrorCode
(*ActivityGiftbagItem)(nil), // 17: ActivityGiftbagItem
} }
var file_pay_pay_msg_proto_depIdxs = []int32{ var file_pay_pay_msg_proto_depIdxs = []int32{
11, // 0: PayRecordResp.info:type_name -> DBUserPay 13, // 0: PayRecordResp.info:type_name -> DBUserPay
12, // 1: PayInfoResp.info:type_name -> DBPayDaily 14, // 1: PayInfoResp.info:type_name -> DBPayDaily
13, // 2: PayDailyBuyResp.items:type_name -> UserAssets 15, // 2: PayDailyBuyResp.items:type_name -> UserAssets
13, // 3: PayShippedPush.items:type_name -> UserAssets 15, // 3: PayShippedPush.items:type_name -> UserAssets
11, // 4: PayShippedPush.info:type_name -> DBUserPay 13, // 4: PayShippedPush.info:type_name -> DBUserPay
14, // 5: PayDeliveryResp.code:type_name -> ErrorCode 16, // 5: PayDeliveryResp.code:type_name -> ErrorCode
15, // 6: PayGetActivityResp.info:type_name -> ActivityGiftbagItem 17, // 6: PayGetActivityResp.info:type_name -> ActivityGiftbagItem
7, // [7:7] is the sub-list for method output_type 15, // 7: PayActivityResp.items:type_name -> UserAssets
7, // [7:7] is the sub-list for method input_type 8, // [8:8] is the sub-list for method output_type
7, // [7:7] is the sub-list for extension type_name 8, // [8:8] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension extendee 8, // [8:8] is the sub-list for extension type_name
0, // [0:7] is the sub-list for field 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() } func init() { file_pay_pay_msg_proto_init() }
@ -848,6 +961,30 @@ func file_pay_pay_msg_proto_init() {
return nil 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{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -855,7 +992,7 @@ func file_pay_pay_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pay_pay_msg_proto_rawDesc, RawDescriptor: file_pay_pay_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 11, NumMessages: 13,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },