From f41030f13768a8aa6950a51ff4db28d86b61862a Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 8 Nov 2022 16:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=AD=97=E7=AC=A6=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pay/api_dailybuy.go | 2 +- modules/pay/api_info.go | 21 ++++- modules/pay/configure.go | 16 +++- modules/pay/modelDaily.go | 13 ++- modules/pay/modelPayUser.go | 57 +++++++++++++ modules/pay/module.go | 27 ++++-- pb/pay_db.pb.go | 164 +++++++++++++++++++++++++----------- 7 files changed, 238 insertions(+), 62 deletions(-) create mode 100644 modules/pay/modelPayUser.go diff --git a/modules/pay/api_dailybuy.go b/modules/pay/api_dailybuy.go index b79ad87f8..4503a7bfc 100644 --- a/modules/pay/api_dailybuy.go +++ b/modules/pay/api_dailybuy.go @@ -41,7 +41,7 @@ func (this *apiComp) DailyBuy(session comm.IUserSession, req *pb.PayDailyBuyReq) return } } - if code = this.module.modelDaily.delivery(session.GetUserId(), conf.Packagetype); code == pb.ErrorCode_Success { + if code = this.module.modelDaily.delivery(session, conf.Packagetype); code != pb.ErrorCode_Success { return } session.SendMsg(string(this.module.GetType()), "dailybuy", &pb.PayDailyBuyResp{Isucc: true}) diff --git a/modules/pay/api_info.go b/modules/pay/api_info.go index 358640a97..3ddc4b5d7 100644 --- a/modules/pay/api_info.go +++ b/modules/pay/api_info.go @@ -18,9 +18,10 @@ func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.PayInfoReq) (c ///获取系统公告 func (this *apiComp) Info(session comm.IUserSession, req *pb.PayInfoReq) (code pb.ErrorCode, data proto.Message) { var ( - info *pb.DBPayDaily - conf *cfg.GamePayPackageData - err error + info *pb.DBPayDaily + goods []*cfg.GamePayPackageData + conf *cfg.GamePayPackageData + err error ) if code = this.InfoCheck(session, req); code != pb.ErrorCode_Success { return @@ -29,6 +30,20 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.PayInfoReq) (code p code = pb.ErrorCode_DBError return } + if goods, err = this.module.configure.getPayPackageDatas(); err != nil { + code = pb.ErrorCode_ConfigNoFound + return + } + for _, v := range goods { + if info.Items[v.Id] == nil { + info.Items[v.Id] = &pb.PayDailyItem{ + Id: v.Id, + Buyunm: v.BuyNum, + Lastrefresh: time.Now().Unix(), + } + } + } + for _, v := range info.Items { if time.Now().Sub(time.Unix(v.Lastrefresh, 0)).Hours() > 24 { if conf, err = this.module.configure.getPayPackageData(v.Id); err != nil { diff --git a/modules/pay/configure.go b/modules/pay/configure.go index 5fdaffd64..485f5b8d1 100644 --- a/modules/pay/configure.go +++ b/modules/pay/configure.go @@ -38,7 +38,7 @@ func (this *configureComp) getGameRecharge(id string) (result *cfg.GameRechargeD return } else { if result, ok = v.(*cfg.GameRecharge).GetDataMap()[id]; !ok { - err = fmt.Errorf("getGameRecharge on found %d", id) + err = fmt.Errorf("getGameRecharge on found %s", id) this.module.Errorf("err:%v", err) return } @@ -46,6 +46,20 @@ func (this *configureComp) getGameRecharge(id string) (result *cfg.GameRechargeD return } +//获取手动加入频道 任务限制 +func (this *configureComp) getPayPackageDatas() (result []*cfg.GamePayPackageData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_paypackage); err != nil { + this.module.Errorf("err:%v", err) + return + } else { + result = v.(*cfg.GamePayPackage).GetDataList() + } + return +} + //获取手动加入频道 任务限制 func (this *configureComp) getPayPackageData(id int32) (result *cfg.GamePayPackageData, err error) { var ( diff --git a/modules/pay/modelDaily.go b/modules/pay/modelDaily.go index 143262b50..24e436ff5 100644 --- a/modules/pay/modelDaily.go +++ b/modules/pay/modelDaily.go @@ -33,11 +33,15 @@ func (this *modelDailyComp) Init(service core.IService, module core.IModule, com //查询用户重置数据 func (this *modelDailyComp) queryUserDaily(uId string) (result *pb.DBPayDaily, err error) { - result = &pb.DBPayDaily{} + result = &pb.DBPayDaily{ + Uid: uId, + Items: make(map[int32]*pb.PayDailyItem), + } if err = this.Get(uId, result); err != nil && err != mgo.MongodbNil { this.module.Errorf("err:%v", err) } if err == mgo.MongodbNil { + err = nil } return @@ -55,7 +59,7 @@ func (this *modelDailyComp) updateUserDaily(info *pb.DBPayDaily) (err error) { } //每日礼包发货 -func (this *modelDailyComp) delivery(uid, pid string) (code pb.ErrorCode) { +func (this *modelDailyComp) delivery(session comm.IUserSession, pid string) (code pb.ErrorCode) { var ( info *pb.DBPayDaily conf *cfg.GamePayPackageData @@ -65,7 +69,7 @@ func (this *modelDailyComp) delivery(uid, pid string) (code pb.ErrorCode) { code = pb.ErrorCode_ConfigNoFound return } - if info, err = this.queryUserDaily(uid); err != nil { + if info, err = this.queryUserDaily(session.GetUserId()); err != nil { code = pb.ErrorCode_ConfigNoFound return } @@ -80,5 +84,8 @@ func (this *modelDailyComp) delivery(uid, pid string) (code pb.ErrorCode) { if err = this.updateUserDaily(info); err != nil { return } + if code = this.module.DispenseRes(session, conf.Item, true); code != pb.ErrorCode_Success { + return + } return } diff --git a/modules/pay/modelPayUser.go b/modules/pay/modelPayUser.go new file mode 100644 index 000000000..6009707f3 --- /dev/null +++ b/modules/pay/modelPayUser.go @@ -0,0 +1,57 @@ +package pay + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +///每日礼包 +type modelPayUserComp struct { + modules.MCompModel + module *Pay +} + +//组件初始化接口 +func (this *modelPayUserComp) 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.TablePayUser + //创建uid索引 + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +//查询用户重置数据 +func (this *modelPayUserComp) queryUserPay(uId string) (result *pb.DBUserPay, err error) { + result = &pb.DBUserPay{ + Uid: uId, + Record: make(map[string]int32), + } + if err = this.Get(uId, result); err != nil && err != mgo.MongodbNil { + this.module.Errorf("err:%v", err) + } + if err == mgo.MongodbNil { + + err = nil + } + return +} + +//添加用户订单数据 +func (this *modelPayUserComp) updateUserPay(info *pb.DBUserPay) (err error) { + if err = this.Change(info.Uid, map[string]interface{}{ + "record": info.Record, + }); err != nil { + this.module.Errorf("err:%v", err) + return + } + return +} diff --git a/modules/pay/module.go b/modules/pay/module.go index b24896454..160580c3c 100644 --- a/modules/pay/module.go +++ b/modules/pay/module.go @@ -24,11 +24,12 @@ func NewModule() core.IModule { type Pay struct { modules.ModuleBase - service base.IRPCXService - api *apiComp - modelPay *modelPayComp - modelDaily *modelDailyComp - configure *configureComp + service base.IRPCXService + api *apiComp + modelPay *modelPayComp + modelPayUser *modelPayUserComp + modelDaily *modelDailyComp + configure *configureComp } //模块名 @@ -54,6 +55,7 @@ func (this *Pay) OnInstallComp() { this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.modelPay = this.RegisterComp(new(modelPayComp)).(*modelPayComp) + this.modelPayUser = this.RegisterComp(new(modelPayUserComp)).(*modelPayUserComp) this.modelDaily = this.RegisterComp(new(modelDailyComp)).(*modelDailyComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } @@ -63,6 +65,7 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery this.Debug("Rpc_ModulePayDelivery", log.Field{Key: "args", Value: args.String()}) var ( conf *cfg.GameRechargeData + info *pb.DBUserPay res []*cfg.Gameatn session comm.IUserSession online bool @@ -72,7 +75,16 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery reply.Code = pb.ErrorCode_ConfigNoFound return } - + if info, err = this.modelPayUser.queryUserPay(session.GetUserId()); err != nil { + reply.Code = pb.ErrorCode_DBError + return + } + if info.Record[args.Productid] > 0 { + res = conf.Vipexp + } else { + res = conf.DiamondNumDouble + } + info.Record[args.Productid]++ if session, online = this.GetUserSession(args.Uid); online { if reply.Code = this.DispenseRes(session, res, true); reply.Code != pb.ErrorCode_Success { return @@ -97,11 +109,12 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery reply.Code = pb.ErrorCode_DBError return } + this.modelPayUser.updateUserPay(info) switch conf.RechargeType { case 1: break case 2: - reply.Code = this.modelDaily.delivery(args.Uid, args.Productid) + reply.Code = this.modelDaily.delivery(session, args.Productid) break } return diff --git a/pb/pay_db.pb.go b/pb/pay_db.pb.go index ec0db6200..0650c413f 100644 --- a/pb/pay_db.pb.go +++ b/pb/pay_db.pb.go @@ -92,6 +92,62 @@ func (x *DBPayOrder) GetCtime() int64 { return 0 } +//用户每日礼包 +type DBUserPay struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id + Record map[string]int32 `protobuf:"bytes,2,rep,name=record,proto3" json:"record" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //商品购买次数 +} + +func (x *DBUserPay) Reset() { + *x = DBUserPay{} + if protoimpl.UnsafeEnabled { + mi := &file_pay_pay_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBUserPay) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBUserPay) ProtoMessage() {} + +func (x *DBUserPay) ProtoReflect() protoreflect.Message { + mi := &file_pay_pay_db_proto_msgTypes[1] + 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 DBUserPay.ProtoReflect.Descriptor instead. +func (*DBUserPay) Descriptor() ([]byte, []int) { + return file_pay_pay_db_proto_rawDescGZIP(), []int{1} +} + +func (x *DBUserPay) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBUserPay) GetRecord() map[string]int32 { + if x != nil { + return x.Record + } + return nil +} + //每日商城商品数据 type PayDailyItem struct { state protoimpl.MessageState @@ -99,15 +155,14 @@ type PayDailyItem struct { unknownFields protoimpl.UnknownFields Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` - Isfirst bool `protobuf:"varint,2,opt,name=isfirst,proto3" json:"isfirst"` - Buyunm int32 `protobuf:"varint,3,opt,name=buyunm,proto3" json:"buyunm"` - Lastrefresh int64 `protobuf:"varint,4,opt,name=lastrefresh,proto3" json:"lastrefresh"` + Buyunm int32 `protobuf:"varint,2,opt,name=buyunm,proto3" json:"buyunm"` + Lastrefresh int64 `protobuf:"varint,3,opt,name=lastrefresh,proto3" json:"lastrefresh"` } func (x *PayDailyItem) Reset() { *x = PayDailyItem{} if protoimpl.UnsafeEnabled { - mi := &file_pay_pay_db_proto_msgTypes[1] + mi := &file_pay_pay_db_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -120,7 +175,7 @@ func (x *PayDailyItem) String() string { func (*PayDailyItem) ProtoMessage() {} func (x *PayDailyItem) ProtoReflect() protoreflect.Message { - mi := &file_pay_pay_db_proto_msgTypes[1] + mi := &file_pay_pay_db_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -133,7 +188,7 @@ func (x *PayDailyItem) ProtoReflect() protoreflect.Message { // Deprecated: Use PayDailyItem.ProtoReflect.Descriptor instead. func (*PayDailyItem) Descriptor() ([]byte, []int) { - return file_pay_pay_db_proto_rawDescGZIP(), []int{1} + return file_pay_pay_db_proto_rawDescGZIP(), []int{2} } func (x *PayDailyItem) GetId() int32 { @@ -143,13 +198,6 @@ func (x *PayDailyItem) GetId() int32 { return 0 } -func (x *PayDailyItem) GetIsfirst() bool { - if x != nil { - return x.Isfirst - } - return false -} - func (x *PayDailyItem) GetBuyunm() int32 { if x != nil { return x.Buyunm @@ -177,7 +225,7 @@ type DBPayDaily struct { func (x *DBPayDaily) Reset() { *x = DBPayDaily{} if protoimpl.UnsafeEnabled { - mi := &file_pay_pay_db_proto_msgTypes[2] + mi := &file_pay_pay_db_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -190,7 +238,7 @@ func (x *DBPayDaily) String() string { func (*DBPayDaily) ProtoMessage() {} func (x *DBPayDaily) ProtoReflect() protoreflect.Message { - mi := &file_pay_pay_db_proto_msgTypes[2] + mi := &file_pay_pay_db_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -203,7 +251,7 @@ func (x *DBPayDaily) ProtoReflect() protoreflect.Message { // Deprecated: Use DBPayDaily.ProtoReflect.Descriptor instead. func (*DBPayDaily) Descriptor() ([]byte, []int) { - return file_pay_pay_db_proto_rawDescGZIP(), []int{2} + return file_pay_pay_db_proto_rawDescGZIP(), []int{3} } func (x *DBPayDaily) GetUid() string { @@ -231,24 +279,31 @@ var file_pay_pay_db_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, - 0x22, 0x72, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x49, 0x74, 0x65, 0x6d, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x69, 0x73, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, - 0x79, 0x75, 0x6e, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x79, 0x75, - 0x6e, 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, 0x22, 0x95, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x50, 0x61, 0x79, 0x44, 0x61, - 0x69, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x79, 0x44, 0x61, 0x69, 0x6c, - 0x79, 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, + 0x22, 0x88, 0x01, 0x0a, 0x09, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x79, 0x2e, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 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, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x0c, 0x50, + 0x61, 0x79, 0x44, 0x61, 0x69, 0x6c, 0x79, 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, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x22, 0x95, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x50, 0x61, 0x79, 0x44, + 0x61, 0x69, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x79, 0x44, 0x61, 0x69, + 0x6c, 0x79, 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 ( @@ -263,21 +318,24 @@ 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, 4) +var file_pay_pay_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_pay_pay_db_proto_goTypes = []interface{}{ (*DBPayOrder)(nil), // 0: DBPayOrder - (*PayDailyItem)(nil), // 1: PayDailyItem - (*DBPayDaily)(nil), // 2: DBPayDaily - nil, // 3: DBPayDaily.ItemsEntry + (*DBUserPay)(nil), // 1: DBUserPay + (*PayDailyItem)(nil), // 2: PayDailyItem + (*DBPayDaily)(nil), // 3: DBPayDaily + nil, // 4: DBUserPay.RecordEntry + nil, // 5: DBPayDaily.ItemsEntry } var file_pay_pay_db_proto_depIdxs = []int32{ - 3, // 0: DBPayDaily.items:type_name -> DBPayDaily.ItemsEntry - 1, // 1: DBPayDaily.ItemsEntry.value:type_name -> PayDailyItem - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 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 } func init() { file_pay_pay_db_proto_init() } @@ -299,7 +357,7 @@ func file_pay_pay_db_proto_init() { } } file_pay_pay_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PayDailyItem); i { + switch v := v.(*DBUserPay); i { case 0: return &v.state case 1: @@ -311,6 +369,18 @@ func file_pay_pay_db_proto_init() { } } file_pay_pay_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayDailyItem); 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[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBPayDaily); i { case 0: return &v.state @@ -329,7 +399,7 @@ func file_pay_pay_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pay_pay_db_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 0, },