This commit is contained in:
meixiongfeng 2023-07-13 15:20:25 +08:00
commit ee00954ac0
8 changed files with 537 additions and 59 deletions

View File

@ -283,6 +283,9 @@ const (
//战令
TableWarorder = "warorder"
//活动礼包
TableActivityGiftbag = "activitygiftbag"
)
// RPC服务接口定义处

View File

@ -441,6 +441,8 @@ type (
IPay interface {
//模拟发货
ModulePayDelivery(session IUserSession, Productid string, Price int32) (errdata *pb.ErrorData)
//开启活动
OpenActivity(atype int32, opentime int64)
}
//支付发货
IPayDelivery interface {

View File

@ -79,7 +79,13 @@ func (this *Passon) HeroUpLv(session comm.IUserSession, heroid string, lv int32)
heros = this.ModuleHero.GetHeroList(session.GetUserId())
// 使用sort.Slice进行排序
sort.Slice(heros, func(i, j int) bool {
return heros[i].Lv > heros[j].Lv
if heros[i].Lv != heros[j].Lv {
return heros[i].Lv > heros[j].Lv
} else {
conf_i, _ := this.ModuleTools.GetHeroConfig(heros[i].HeroID)
conf_j, _ := this.ModuleTools.GetHeroConfig(heros[i].HeroID)
return conf_i.Color > conf_j.Color
}
})
if len(heros) < 5 {

View File

@ -0,0 +1,65 @@
package pay
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
// 参数校验
func (this *apiComp) GetActivityCheck(session comm.IUserSession, req *pb.PayGetActivityReq) (errdata *pb.ErrorData) {
return
}
// /获取系统公告
func (this *apiComp) GetActivity(session comm.IUserSession, req *pb.PayGetActivityReq) (errdata *pb.ErrorData) {
var (
activitys *pb.DBActivityGiftbag
info *pb.ActivityGiftbagItem
otime int64
err error
ok bool
)
if errdata = this.GetActivityCheck(session, req); errdata != nil {
return
}
if activitys, 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 otime, ok = this.module.modelActivity.getopentime(req.Atype); !ok {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_WarorderNoOpen,
Title: pb.ErrorCode_WarorderNoOpen.ToString(),
Message: fmt.Sprintf("Activity:%d no open", req.Atype),
}
return
}
if info, ok = activitys.Activitys[req.Atype]; !ok {
info = &pb.ActivityGiftbagItem{}
activitys.Activitys[req.Atype] = info
}
if info.Opentime != otime {
info.Opentime = otime
info.Items = make(map[int32]*pb.PayDailyItem)
if err = this.module.modelActivity.updateActivitys(session.GetUserId(), activitys); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
}
session.SendMsg(string(this.module.GetType()), "info", &pb.PayGetActivityResp{Info: info})
return
}

View File

@ -0,0 +1,86 @@
package pay
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"sync"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
// 活动礼包
type modelActivityComp struct {
modules.MCompModel
module *Pay
lock sync.RWMutex
opentime map[int32]int64
}
// 组件初始化接口
func (this *modelActivityComp) 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.TableActivityGiftbag
//创建uid索引
this.lock.Lock()
this.opentime = make(map[int32]int64)
this.lock.Unlock()
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
func (this *modelActivityComp) getopentime(wtype int32) (otime int64, open bool) {
this.lock.RLock()
otime, open = this.opentime[wtype]
this.lock.RUnlock()
return
}
func (this *modelActivityComp) setopentime(wtype int32, opentime int64) {
this.lock.RLock()
this.opentime[wtype] = opentime
this.lock.RUnlock()
return
}
// 获取用户全部的埋点数据
func (this *modelActivityComp) getUserActivitys(uid string) (results *pb.DBActivityGiftbag, err error) {
results = &pb.DBActivityGiftbag{}
if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil {
this.module.Errorln(err)
return
}
if err == mgo.MongodbNil {
err = nil
results = &pb.DBActivityGiftbag{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Activitys: make(map[int32]*pb.ActivityGiftbagItem),
}
err = this.Add(uid, results)
}
return
}
func (this *modelActivityComp) updateActivitys(uid string, data *pb.DBActivityGiftbag) (err error) {
if err = this.Change(uid, map[string]interface{}{
"activitys": data.Activitys,
}); err != nil {
this.module.Error("更新用户活动礼包数据 错误!", log.Field{Key: "err", Value: err.Error()})
return
}
return
}
// 每日礼包发货
func (this *modelActivityComp) delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
return
}

View File

@ -26,14 +26,15 @@ func NewModule() core.IModule {
type Pay struct {
modules.ModuleBase
service base.IRPCXService
api *apiComp
modelPay *modelPayComp
modelPayUser *modelPayUserComp
modelDaily *modelDailyComp
privilege comm.IPayDelivery //月卡
warorder comm.IWarorder //战令
configure *configureComp
service base.IRPCXService
api *apiComp
modelPay *modelPayComp
modelPayUser *modelPayUserComp
modelDaily *modelDailyComp
modelActivity *modelActivityComp //活动礼包
privilege comm.IPayDelivery //月卡
warorder comm.IWarorder //战令
configure *configureComp
}
// 模块名
@ -223,21 +224,26 @@ func (this *Pay) ModulePayDelivery(session comm.IUserSession, Productid string,
switch conf.RechargeType {
case 1:
break
case 2:
case 2: //每日礼包
if errdata, items = this.modelDaily.delivery(session, Productid); errdata != nil {
return
}
break
case 3:
case 3: //月卡
if errdata, items = this.privilege.Delivery(session, Productid); errdata != nil {
return
}
break
case 4:
case 4: //战令
if errdata, items = this.warorder.Delivery(session, Productid); errdata != nil {
return
}
break
case 5: //活动充值礼包
if errdata, items = this.modelActivity.delivery(session, Productid); errdata != nil {
return
}
break
}
for _, v := range res {
items = append(items, &pb.UserAssets{A: v.A, T: v.T, N: v.N})
@ -257,3 +263,8 @@ func (this *Pay) ModulePayDelivery(session comm.IUserSession, Productid string,
go this.ModuleHero.RechargeMoney(session.GetUserId(), conf.Amount)
return
}
// 开启活动礼包
func (this *Pay) OpenActivity(atype int32, opentime int64) {
this.modelActivity.setopentime(atype, opentime)
}

View File

@ -92,7 +92,7 @@ func (x *DBPayOrder) GetCtime() int64 {
return 0
}
//
//用户购买记录
type DBUserPay struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -268,6 +268,126 @@ func (x *DBPayDaily) GetItems() map[int32]*PayDailyItem {
return nil
}
//活动礼包
type DBActivityGiftbag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //唯一ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
Activitys map[int32]*ActivityGiftbagItem `protobuf:"bytes,3,rep,name=activitys,proto3" json:"activitys" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //活动礼包
}
func (x *DBActivityGiftbag) Reset() {
*x = DBActivityGiftbag{}
if protoimpl.UnsafeEnabled {
mi := &file_pay_pay_db_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBActivityGiftbag) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBActivityGiftbag) ProtoMessage() {}
func (x *DBActivityGiftbag) ProtoReflect() protoreflect.Message {
mi := &file_pay_pay_db_proto_msgTypes[4]
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 DBActivityGiftbag.ProtoReflect.Descriptor instead.
func (*DBActivityGiftbag) Descriptor() ([]byte, []int) {
return file_pay_pay_db_proto_rawDescGZIP(), []int{4}
}
func (x *DBActivityGiftbag) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DBActivityGiftbag) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBActivityGiftbag) GetActivitys() map[int32]*ActivityGiftbagItem {
if x != nil {
return x.Activitys
}
return nil
}
//活动礼包
type ActivityGiftbagItem struct {
state protoimpl.MessageState
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"` //商品购买次数
}
func (x *ActivityGiftbagItem) Reset() {
*x = ActivityGiftbagItem{}
if protoimpl.UnsafeEnabled {
mi := &file_pay_pay_db_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ActivityGiftbagItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ActivityGiftbagItem) ProtoMessage() {}
func (x *ActivityGiftbagItem) ProtoReflect() protoreflect.Message {
mi := &file_pay_pay_db_proto_msgTypes[5]
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 ActivityGiftbagItem.ProtoReflect.Descriptor instead.
func (*ActivityGiftbagItem) Descriptor() ([]byte, []int) {
return file_pay_pay_db_proto_rawDescGZIP(), []int{5}
}
func (x *ActivityGiftbagItem) GetOpentime() int64 {
if x != nil {
return x.Opentime
}
return 0
}
func (x *ActivityGiftbagItem) GetItems() map[int32]*PayDailyItem {
if x != nil {
return x.Items
}
return nil
}
var File_pay_pay_db_proto protoreflect.FileDescriptor
var file_pay_pay_db_proto_rawDesc = []byte{
@ -302,8 +422,32 @@ var file_pay_pay_db_proto_rawDesc = []byte{
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,
0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xca, 0x01,
0x0a, 0x11, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74,
0x62, 0x61, 0x67, 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, 0x3f, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x2e, 0x41, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x73, 0x1a, 0x52, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
0x74, 0x79, 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, 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,
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,
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,
}
var (
@ -318,24 +462,32 @@ 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, 6)
var file_pay_pay_db_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_pay_pay_db_proto_goTypes = []interface{}{
(*DBPayOrder)(nil), // 0: DBPayOrder
(*DBUserPay)(nil), // 1: DBUserPay
(*PayDailyItem)(nil), // 2: PayDailyItem
(*DBPayDaily)(nil), // 3: DBPayDaily
nil, // 4: DBUserPay.RecordEntry
nil, // 5: DBPayDaily.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
nil, // 6: DBUserPay.RecordEntry
nil, // 7: DBPayDaily.ItemsEntry
nil, // 8: DBActivityGiftbag.ActivitysEntry
nil, // 9: ActivityGiftbagItem.ItemsEntry
}
var file_pay_pay_db_proto_depIdxs = []int32{
4, // 0: DBUserPay.record:type_name -> DBUserPay.RecordEntry
5, // 1: DBPayDaily.items:type_name -> DBPayDaily.ItemsEntry
2, // 2: DBPayDaily.ItemsEntry.value:type_name -> PayDailyItem
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
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
}
func init() { file_pay_pay_db_proto_init() }
@ -392,6 +544,30 @@ func file_pay_pay_db_proto_init() {
return nil
}
}
file_pay_pay_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBActivityGiftbag); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pay_pay_db_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ActivityGiftbagItem); 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{
@ -399,7 +575,7 @@ func file_pay_pay_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pay_pay_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 10,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -512,6 +512,101 @@ func (x *PayDeliveryResp) GetData() string {
return ""
}
// 获取礼包信息
type PayGetActivityReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Atype int32 `protobuf:"varint,1,opt,name=atype,proto3" json:"atype"` //活动类型
}
func (x *PayGetActivityReq) Reset() {
*x = PayGetActivityReq{}
if protoimpl.UnsafeEnabled {
mi := &file_pay_pay_msg_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PayGetActivityReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PayGetActivityReq) ProtoMessage() {}
func (x *PayGetActivityReq) ProtoReflect() protoreflect.Message {
mi := &file_pay_pay_msg_proto_msgTypes[9]
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 PayGetActivityReq.ProtoReflect.Descriptor instead.
func (*PayGetActivityReq) Descriptor() ([]byte, []int) {
return file_pay_pay_msg_proto_rawDescGZIP(), []int{9}
}
func (x *PayGetActivityReq) GetAtype() int32 {
if x != nil {
return x.Atype
}
return 0
}
type PayGetActivityResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Info *ActivityGiftbagItem `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
}
func (x *PayGetActivityResp) Reset() {
*x = PayGetActivityResp{}
if protoimpl.UnsafeEnabled {
mi := &file_pay_pay_msg_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PayGetActivityResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PayGetActivityResp) ProtoMessage() {}
func (x *PayGetActivityResp) ProtoReflect() protoreflect.Message {
mi := &file_pay_pay_msg_proto_msgTypes[10]
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 PayGetActivityResp.ProtoReflect.Descriptor instead.
func (*PayGetActivityResp) Descriptor() ([]byte, []int) {
return file_pay_pay_msg_proto_rawDescGZIP(), []int{10}
}
func (x *PayGetActivityResp) GetInfo() *ActivityGiftbagItem {
if x != nil {
return x.Info
}
return nil
}
var File_pay_pay_msg_proto protoreflect.FileDescriptor
var file_pay_pay_msg_proto_rawDesc = []byte{
@ -556,8 +651,14 @@ var file_pay_pay_msg_proto_rawDesc = []byte{
0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10,
0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67,
0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x64, 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a, 0x11, 0x50, 0x61, 0x79, 0x47, 0x65, 0x74, 0x41, 0x63,
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, 0x79,
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x61, 0x74, 0x79, 0x70, 0x65, 0x22,
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,
}
var (
@ -572,34 +673,38 @@ 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, 9)
var file_pay_pay_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_pay_pay_msg_proto_goTypes = []interface{}{
(*PayRecordReq)(nil), // 0: PayRecordReq
(*PayRecordResp)(nil), // 1: PayRecordResp
(*PayInfoReq)(nil), // 2: PayInfoReq
(*PayInfoResp)(nil), // 3: PayInfoResp
(*PayDailyBuyReq)(nil), // 4: PayDailyBuyReq
(*PayDailyBuyResp)(nil), // 5: PayDailyBuyResp
(*PayShippedPush)(nil), // 6: PayShippedPush
(*PayDeliveryReq)(nil), // 7: PayDeliveryReq
(*PayDeliveryResp)(nil), // 8: PayDeliveryResp
(*DBUserPay)(nil), // 9: DBUserPay
(*DBPayDaily)(nil), // 10: DBPayDaily
(*UserAssets)(nil), // 11: UserAssets
(ErrorCode)(0), // 12: ErrorCode
(*PayRecordReq)(nil), // 0: PayRecordReq
(*PayRecordResp)(nil), // 1: PayRecordResp
(*PayInfoReq)(nil), // 2: PayInfoReq
(*PayInfoResp)(nil), // 3: PayInfoResp
(*PayDailyBuyReq)(nil), // 4: PayDailyBuyReq
(*PayDailyBuyResp)(nil), // 5: PayDailyBuyResp
(*PayShippedPush)(nil), // 6: PayShippedPush
(*PayDeliveryReq)(nil), // 7: PayDeliveryReq
(*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
}
var file_pay_pay_msg_proto_depIdxs = []int32{
9, // 0: PayRecordResp.info:type_name -> DBUserPay
10, // 1: PayInfoResp.info:type_name -> DBPayDaily
11, // 2: PayDailyBuyResp.items:type_name -> UserAssets
11, // 3: PayShippedPush.items:type_name -> UserAssets
9, // 4: PayShippedPush.info:type_name -> DBUserPay
12, // 5: PayDeliveryResp.code:type_name -> ErrorCode
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
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
}
func init() { file_pay_pay_msg_proto_init() }
@ -719,6 +824,30 @@ func file_pay_pay_msg_proto_init() {
return nil
}
}
file_pay_pay_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PayGetActivityReq); 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[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PayGetActivityResp); 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{
@ -726,7 +855,7 @@ func file_pay_pay_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pay_pay_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 11,
NumExtensions: 0,
NumServices: 0,
},