diff --git a/comm/const.go b/comm/const.go index 905e7ca3c..b6b27bb0e 100644 --- a/comm/const.go +++ b/comm/const.go @@ -109,6 +109,7 @@ const ( ModuleDragon core.M_Modules = "dragon" //坐骑 ModuleCaptureSheep core.M_Modules = "capturesheep" //捕羊大赛 ModuleTurntable core.M_Modules = "turntable" // + ModuleVenture core.M_Modules = "venture" // ) // 数据表名定义处 @@ -374,6 +375,9 @@ const ( TableCapturesheepRank = "capturesheeprank" //排名 TableTurntable = "turntable" + + TableVentureSign = "venturesign" + TableVentureLv = "venturelv" ) // RPC服务接口定义处 diff --git a/modules/activity/comp_configure.go b/modules/activity/comp_configure.go index 5affdc9ab..88465ea0d 100644 --- a/modules/activity/comp_configure.go +++ b/modules/activity/comp_configure.go @@ -11,7 +11,7 @@ import ( ) const ( - hdcelebration = "game_celebration.json" //开服庆典 + hdcelebration = "game_celebration.json" ) // /配置管理基础组件 diff --git a/modules/activity/module.go b/modules/activity/module.go index dd2926e9c..d253fc949 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -290,18 +290,8 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul continue } } - if activity.Itype == pb.HdType_HdTypeSign || activity.Itype == pb.HdType_HdLevel || activity.Itype == pb.HdType_HdCelebration { + if activity.Itype == pb.HdType_HdLevel || activity.Itype == pb.HdType_HdCelebration { list, _ = this.modelhdData.getHddataByOid(session.GetUserId(), id) - if activity.Itype == pb.HdType_HdTypeSign { - if list.Val == 0 || !utils.IsToday(list.Lasttime) { - list.Lasttime = curTime - list.Val += 1 - update := make(map[string]interface{}) - update["lasttime"] = list.Lasttime - update["val"] = list.Val - this.modelhdData.ModifyActivityList(session.GetUserId(), list.Id, update) - } - } // 开服等级活动 if activity.Itype == pb.HdType_HdLevel { diff --git a/modules/turntable/module.go b/modules/turntable/module.go index 9634923e6..20c3e5057 100644 --- a/modules/turntable/module.go +++ b/modules/turntable/module.go @@ -159,9 +159,9 @@ func (this *Turntable) EventUserLogin(session comm.IUserSession) { this.mail.SendMailByCid(session, comm.Venturegifts, reward) } } + turntable.Reward = true + this.modelt.Change(session.GetUserId(), map[string]interface{}{ + "reward": turntable.Reward, + }) } - turntable.Reward = true - this.modelt.Change(session.GetUserId(), map[string]interface{}{ - "reward": turntable.Reward, - }) } diff --git a/modules/venture/api.go b/modules/venture/api.go new file mode 100644 index 000000000..426cbdb18 --- /dev/null +++ b/modules/venture/api.go @@ -0,0 +1,20 @@ +package venture + +import ( + "go_dreamfactory/lego/base" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +type apiComp struct { + modules.MCompGate + service base.IRPCXService + module *Venture +} + +func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + _ = this.MCompGate.Init(service, module, comp, options) + this.service = service.(base.IRPCXService) + this.module = module.(*Venture) + return +} diff --git a/modules/venture/api_lvlist.go b/modules/venture/api_lvlist.go new file mode 100644 index 000000000..6bc3ef46f --- /dev/null +++ b/modules/venture/api_lvlist.go @@ -0,0 +1,37 @@ +package venture + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +// 参数校验 +func (this *apiComp) LvGetListCheck(session comm.IUserSession, req *pb.VentureLvGetListReq) (errdata *pb.ErrorData) { + + return +} + +// /获取自己的排行榜信息 +func (this *apiComp) LvGetList(session comm.IUserSession, req *pb.VentureLvGetListReq) (errdata *pb.ErrorData) { + var ( + lvdata *pb.DBVentureLv + err error + ) + if errdata = this.LvGetListCheck(session, req); errdata != nil { + return + } + + if lvdata, err = this.module.ModelLv.getUserVentureLvData(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + session.SendMsg(string(this.module.GetType()), "lvgetlist", &pb.VentureLvGetListResp{ + Data: lvdata, + }) + return +} diff --git a/modules/venture/api_lvreward.go b/modules/venture/api_lvreward.go new file mode 100644 index 000000000..419e78585 --- /dev/null +++ b/modules/venture/api_lvreward.go @@ -0,0 +1,86 @@ +package venture + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +// 参数校验 +func (this *apiComp) LvRewardCheck(session comm.IUserSession, req *pb.VenturLvRewardReq) (errdata *pb.ErrorData) { + if req.Cid == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + } + return +} + +func (this *apiComp) LvReward(session comm.IUserSession, req *pb.VenturLvRewardReq) (errdata *pb.ErrorData) { + var ( + err error + conf *cfg.GameVenturegiftsLvawardData + ventureLv *pb.DBVentureLv + atno []*pb.UserAtno + user *pb.DBUser + ) + if errdata = this.LvRewardCheck(session, req); errdata != nil { + return + } + + if conf, err = this.module.configure.getGameVenturegiftsLvReward(req.Cid); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + if ventureLv, err = this.module.ModelLv.getUserVentureLvData(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + // 等级校验 + if user = this.module.ModuleUser.GetUser(session.GetUserId()); user == nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + if conf.Lvcondition > user.Lv { // 等级不够 + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ActivityCantReward, + Title: pb.ErrorCode_ActivityCantReward.ToString(), + Message: err.Error(), + } + return + } + if _, ok := ventureLv.Reward[req.Cid]; ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ActivityRepatReward, + Title: pb.ErrorCode_ActivityRepatReward.ToString(), + Message: err.Error(), + } + return + } + if errdata, atno = this.module.DispenseAtno(session, []*cfg.Gameatn{conf.Reward}, true); errdata != nil { + return + } + ventureLv.Reward[req.Cid] = 1 + this.module.ModelSign.Change(session.GetUserId(), map[string]interface{}{ + "reward": ventureLv.Reward, + }) + session.SendMsg(string(this.module.GetType()), "lvreward", &pb.VenturLvRewardResp{ + Data: ventureLv, + Atno: atno, + }) + return +} diff --git a/modules/venture/api_signlist.go b/modules/venture/api_signlist.go new file mode 100644 index 000000000..e4cf52048 --- /dev/null +++ b/modules/venture/api_signlist.go @@ -0,0 +1,46 @@ +package venture + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" + "go_dreamfactory/utils" +) + +// 参数校验 +func (this *apiComp) SignGetListCheck(session comm.IUserSession, req *pb.VentureSignGetListReq) (errdata *pb.ErrorData) { + + return +} + +// /获取自己的排行榜信息 +func (this *apiComp) SignGetList(session comm.IUserSession, req *pb.VentureSignGetListReq) (errdata *pb.ErrorData) { + var ( + sign *pb.DBVentureSign + err error + ) + if errdata = this.SignGetListCheck(session, req); errdata != nil { + return + } + + if sign, err = this.module.ModelSign.getUserSign(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + if !utils.IsToday(sign.Lasttime) { + sign.Lasttime = configure.Now().Unix() + sign.Val += 1 + this.module.ModelSign.Change(session.GetUserId(), map[string]interface{}{ + "lasttime": sign.Lasttime, + "val": sign.Val, + }) + } + session.SendMsg(string(this.module.GetType()), "signgetlist", &pb.VentureSignGetListResp{ + Sign: sign, + }) + return +} diff --git a/modules/venture/api_signreward.go b/modules/venture/api_signreward.go new file mode 100644 index 000000000..f56a84b1e --- /dev/null +++ b/modules/venture/api_signreward.go @@ -0,0 +1,76 @@ +package venture + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +// 参数校验 +func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.VentureSignRewardReq) (errdata *pb.ErrorData) { + if req.Day == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + } + return +} + +func (this *apiComp) Receive(session comm.IUserSession, req *pb.VentureSignRewardReq) (errdata *pb.ErrorData) { + var ( + err error + conf *cfg.GameVenturegiftsLoginData + sign *pb.DBVentureSign + atno []*pb.UserAtno + ) + if errdata = this.ReceiveCheck(session, req); errdata != nil { + return + } + + if conf, err = this.module.configure.getGameVenturegiftsLogin(req.Day); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + if sign, err = this.module.ModelSign.getUserSign(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + if len(sign.Sign) >= int(sign.Val) { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ActivityCantReward, + Title: pb.ErrorCode_ActivityCantReward.ToString(), + Message: err.Error(), + } + return + } + if _, ok := sign.Sign[req.Day]; ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ActivityRepatReward, + Title: pb.ErrorCode_ActivityRepatReward.ToString(), + Message: err.Error(), + } + return + } + if errdata, atno = this.module.DispenseAtno(session, []*cfg.Gameatn{conf.Loginreward}, true); errdata != nil { + return + } + sign.Sign[req.Day] = 1 + this.module.ModelSign.Change(session.GetUserId(), map[string]interface{}{ + "sign": sign.Sign, + }) + session.SendMsg(string(this.module.GetType()), "signreward", &pb.VentureSignRewardResp{ + Sign: sign, + Atno: atno, + }) + return +} diff --git a/modules/venture/configure.go b/modules/venture/configure.go new file mode 100644 index 000000000..424c4202d --- /dev/null +++ b/modules/venture/configure.go @@ -0,0 +1,56 @@ +package venture + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" + cfg "go_dreamfactory/sys/configure/structs" +) + +const ( + game_venturegiflogin = "game_venturegiftslogin.json" + game_venturegiftslvaward = "game_venturegiftslvaward.json" +) + +type configureComp struct { + modules.MCompConfigure + module *Venture +} + +func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompConfigure.Init(service, module, comp, options) + this.module = module.(*Venture) + return +} + +func (this *configureComp) getGameVenturegiftsLogin(id int32) (conf *cfg.GameVenturegiftsLoginData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_venturegiflogin); err != nil { + return + } + if conf, ok = v.(*cfg.GameVenturegiftsLogin).GetDataMap()[id]; !ok { + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_venturegiflogin, id) + this.module.Errorln(err) + return + } + return +} + +func (this *configureComp) getGameVenturegiftsLvReward(id int32) (conf *cfg.GameVenturegiftsLvawardData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_venturegiftslvaward); err != nil { + return + } + if conf, ok = v.(*cfg.GameVenturegiftsLvaward).GetDataMap()[id]; !ok { + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_venturegiftslvaward, id) + this.module.Errorln(err) + return + } + return +} diff --git a/modules/venture/modellv.go b/modules/venture/modellv.go new file mode 100644 index 000000000..61d9e3fdb --- /dev/null +++ b/modules/venture/modellv.go @@ -0,0 +1,46 @@ +package venture + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +type ModelLv struct { + modules.MCompModel + module *Venture +} + +func (this *ModelLv) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompModel.Init(service, module, comp, options) + this.TableName = comm.TableVentureLv + this.module = module.(*Venture) + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +// 获取用户全部的埋点数据 +func (this *ModelLv) getUserVentureLvData(uid string) (results *pb.DBVentureLv, err error) { + results = &pb.DBVentureLv{} + if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil { + this.module.Errorln(err) + return + } + if err == mgo.MongodbNil { + results = &pb.DBVentureLv{ + Id: primitive.NewObjectID().Hex(), + Uid: uid, + Reward: map[int32]int32{}, + } + err = this.Add(uid, results) + } + return +} diff --git a/modules/venture/modelsign.go b/modules/venture/modelsign.go new file mode 100644 index 000000000..23f61ebc4 --- /dev/null +++ b/modules/venture/modelsign.go @@ -0,0 +1,46 @@ +package venture + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +type ModelSign struct { + modules.MCompModel + module *Venture +} + +func (this *ModelSign) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompModel.Init(service, module, comp, options) + this.TableName = comm.TableVentureSign + this.module = module.(*Venture) + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +// 获取用户全部的埋点数据 +func (this *ModelSign) getUserSign(uid string) (results *pb.DBVentureSign, err error) { + results = &pb.DBVentureSign{} + if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil { + this.module.Errorln(err) + return + } + if err == mgo.MongodbNil { + results = &pb.DBVentureSign{ + Id: primitive.NewObjectID().Hex(), + Uid: uid, + Sign: map[int32]int32{}, + } + err = this.Add(uid, results) + } + return +} diff --git a/modules/venture/module.go b/modules/venture/module.go new file mode 100644 index 000000000..9c37b3edb --- /dev/null +++ b/modules/venture/module.go @@ -0,0 +1,44 @@ +package venture + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +type Venture struct { + modules.ModuleBase + service core.IService + api *apiComp + configure *configureComp + ModelSign *ModelSign + ModelLv *ModelLv +} + +func NewModule() core.IModule { + return &Venture{} +} + +func (this *Venture) GetType() core.M_Modules { + return comm.ModuleVenture +} + +func (this *Venture) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { + err = this.ModuleBase.Init(service, module, options) + this.service = service + return +} + +func (this *Venture) Start() (err error) { + err = this.ModuleBase.Start() + + return +} + +func (this *Venture) OnInstallComp() { + this.ModuleBase.OnInstallComp() + this.api = this.RegisterComp(new(apiComp)).(*apiComp) + this.ModelSign = this.RegisterComp(new(ModelSign)).(*ModelSign) + this.ModelLv = this.RegisterComp(new(ModelLv)).(*ModelLv) + this.configure = this.RegisterComp(new(configureComp)).(*configureComp) +} diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index 6fd367f13..ee4b4bd19 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -443,8 +443,6 @@ const ( ErrorCode_ActivityNotIntime ErrorCode = 5004 // 不在活动时间范围 ErrorCode_ActivityInvalid ErrorCode = 5005 // 不存在的活动 ErrorCode_ActivityCantReward ErrorCode = 5006 // 还不能领奖 - //捕羊大赛的 - ErrorCode_CapturesheepRankCloseed ErrorCode = 5101 //排位比赛不在开启时间内 ) // Enum value maps for ErrorCode. @@ -827,7 +825,6 @@ var ( 5004: "ActivityNotIntime", 5005: "ActivityInvalid", 5006: "ActivityCantReward", - 5101: "CapturesheepRankCloseed", } ErrorCode_value = map[string]int32{ "Success": 0, @@ -1207,7 +1204,6 @@ var ( "ActivityNotIntime": 5004, "ActivityInvalid": 5005, "ActivityCantReward": 5006, - "CapturesheepRankCloseed": 5101, } ) @@ -1242,7 +1238,7 @@ var File_errorcode_proto protoreflect.FileDescriptor var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2a, 0x91, 0x46, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xf3, 0x45, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, @@ -1801,10 +1797,8 @@ var file_errorcode_proto_rawDesc = []byte{ 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x10, 0x8c, 0x27, 0x12, 0x14, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x8d, 0x27, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x43, 0x61, 0x6e, 0x74, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x10, 0x8e, 0x27, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x61, 0x70, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x68, 0x65, 0x65, 0x70, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6c, 0x6f, 0x73, 0x65, - 0x65, 0x64, 0x10, 0xed, 0x27, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x77, 0x61, 0x72, 0x64, 0x10, 0x8e, 0x27, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/venture_db.pb.go b/pb/venture_db.pb.go new file mode 100644 index 000000000..65c268abb --- /dev/null +++ b/pb/venture_db.pb.go @@ -0,0 +1,274 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: venture/venture_db.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DBVentureSign struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` + Sign map[int32]int32 `protobuf:"bytes,3,rep,name=sign,proto3" json:"sign" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Val int32 `protobuf:"varint,4,opt,name=val,proto3" json:"val"` // 进度 + Lasttime int64 `protobuf:"varint,5,opt,name=lasttime,proto3" json:"lasttime"` // 记录登录时间 +} + +func (x *DBVentureSign) Reset() { + *x = DBVentureSign{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBVentureSign) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBVentureSign) ProtoMessage() {} + +func (x *DBVentureSign) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_db_proto_msgTypes[0] + 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 DBVentureSign.ProtoReflect.Descriptor instead. +func (*DBVentureSign) Descriptor() ([]byte, []int) { + return file_venture_venture_db_proto_rawDescGZIP(), []int{0} +} + +func (x *DBVentureSign) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBVentureSign) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBVentureSign) GetSign() map[int32]int32 { + if x != nil { + return x.Sign + } + return nil +} + +func (x *DBVentureSign) GetVal() int32 { + if x != nil { + return x.Val + } + return 0 +} + +func (x *DBVentureSign) GetLasttime() int64 { + if x != nil { + return x.Lasttime + } + return 0 +} + +type DBVentureLv struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` + Reward map[int32]int32 `protobuf:"bytes,3,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *DBVentureLv) Reset() { + *x = DBVentureLv{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBVentureLv) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBVentureLv) ProtoMessage() {} + +func (x *DBVentureLv) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_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 DBVentureLv.ProtoReflect.Descriptor instead. +func (*DBVentureLv) Descriptor() ([]byte, []int) { + return file_venture_venture_db_proto_rawDescGZIP(), []int{1} +} + +func (x *DBVentureLv) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBVentureLv) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBVentureLv) GetReward() map[int32]int32 { + if x != nil { + return x.Reward + } + return nil +} + +var File_venture_venture_db_proto protoreflect.FileDescriptor + +var file_venture_venture_db_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x2f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x0d, 0x44, + 0x42, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 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, 0x2c, + 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, + 0x42, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x10, 0x0a, 0x03, + 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x69, + 0x67, 0x6e, 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, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x9c, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x65, 0x4c, 0x76, 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, 0x30, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x65, 0x4c, 0x76, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 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, 0x05, 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 ( + file_venture_venture_db_proto_rawDescOnce sync.Once + file_venture_venture_db_proto_rawDescData = file_venture_venture_db_proto_rawDesc +) + +func file_venture_venture_db_proto_rawDescGZIP() []byte { + file_venture_venture_db_proto_rawDescOnce.Do(func() { + file_venture_venture_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_venture_venture_db_proto_rawDescData) + }) + return file_venture_venture_db_proto_rawDescData +} + +var file_venture_venture_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_venture_venture_db_proto_goTypes = []interface{}{ + (*DBVentureSign)(nil), // 0: DBVentureSign + (*DBVentureLv)(nil), // 1: DBVentureLv + nil, // 2: DBVentureSign.SignEntry + nil, // 3: DBVentureLv.RewardEntry +} +var file_venture_venture_db_proto_depIdxs = []int32{ + 2, // 0: DBVentureSign.sign:type_name -> DBVentureSign.SignEntry + 3, // 1: DBVentureLv.reward:type_name -> DBVentureLv.RewardEntry + 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 +} + +func init() { file_venture_venture_db_proto_init() } +func file_venture_venture_db_proto_init() { + if File_venture_venture_db_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_venture_venture_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBVentureSign); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_venture_venture_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBVentureLv); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_venture_venture_db_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_venture_venture_db_proto_goTypes, + DependencyIndexes: file_venture_venture_db_proto_depIdxs, + MessageInfos: file_venture_venture_db_proto_msgTypes, + }.Build() + File_venture_venture_db_proto = out.File + file_venture_venture_db_proto_rawDesc = nil + file_venture_venture_db_proto_goTypes = nil + file_venture_venture_db_proto_depIdxs = nil +} diff --git a/pb/venture_msg.pb.go b/pb/venture_msg.pb.go new file mode 100644 index 000000000..ee7c26986 --- /dev/null +++ b/pb/venture_msg.pb.go @@ -0,0 +1,599 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: venture/venture_msg.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// 签到数据 +type VentureSignGetListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *VentureSignGetListReq) Reset() { + *x = VentureSignGetListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VentureSignGetListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VentureSignGetListReq) ProtoMessage() {} + +func (x *VentureSignGetListReq) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_msg_proto_msgTypes[0] + 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 VentureSignGetListReq.ProtoReflect.Descriptor instead. +func (*VentureSignGetListReq) Descriptor() ([]byte, []int) { + return file_venture_venture_msg_proto_rawDescGZIP(), []int{0} +} + +type VentureSignGetListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sign *DBVentureSign `protobuf:"bytes,1,opt,name=sign,proto3" json:"sign"` +} + +func (x *VentureSignGetListResp) Reset() { + *x = VentureSignGetListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VentureSignGetListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VentureSignGetListResp) ProtoMessage() {} + +func (x *VentureSignGetListResp) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_msg_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 VentureSignGetListResp.ProtoReflect.Descriptor instead. +func (*VentureSignGetListResp) Descriptor() ([]byte, []int) { + return file_venture_venture_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *VentureSignGetListResp) GetSign() *DBVentureSign { + if x != nil { + return x.Sign + } + return nil +} + +type VentureSignRewardReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Day int32 `protobuf:"varint,1,opt,name=day,proto3" json:"day"` // 签到的天数 +} + +func (x *VentureSignRewardReq) Reset() { + *x = VentureSignRewardReq{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VentureSignRewardReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VentureSignRewardReq) ProtoMessage() {} + +func (x *VentureSignRewardReq) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_msg_proto_msgTypes[2] + 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 VentureSignRewardReq.ProtoReflect.Descriptor instead. +func (*VentureSignRewardReq) Descriptor() ([]byte, []int) { + return file_venture_venture_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *VentureSignRewardReq) GetDay() int32 { + if x != nil { + return x.Day + } + return 0 +} + +type VentureSignRewardResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sign *DBVentureSign `protobuf:"bytes,1,opt,name=sign,proto3" json:"sign"` + Atno []*UserAtno `protobuf:"bytes,2,rep,name=atno,proto3" json:"atno"` +} + +func (x *VentureSignRewardResp) Reset() { + *x = VentureSignRewardResp{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VentureSignRewardResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VentureSignRewardResp) ProtoMessage() {} + +func (x *VentureSignRewardResp) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_msg_proto_msgTypes[3] + 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 VentureSignRewardResp.ProtoReflect.Descriptor instead. +func (*VentureSignRewardResp) Descriptor() ([]byte, []int) { + return file_venture_venture_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *VentureSignRewardResp) GetSign() *DBVentureSign { + if x != nil { + return x.Sign + } + return nil +} + +func (x *VentureSignRewardResp) GetAtno() []*UserAtno { + if x != nil { + return x.Atno + } + return nil +} + +// 等级奖励 +type VentureLvGetListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *VentureLvGetListReq) Reset() { + *x = VentureLvGetListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VentureLvGetListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VentureLvGetListReq) ProtoMessage() {} + +func (x *VentureLvGetListReq) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_msg_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 VentureLvGetListReq.ProtoReflect.Descriptor instead. +func (*VentureLvGetListReq) Descriptor() ([]byte, []int) { + return file_venture_venture_msg_proto_rawDescGZIP(), []int{4} +} + +type VentureLvGetListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBVentureLv `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *VentureLvGetListResp) Reset() { + *x = VentureLvGetListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VentureLvGetListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VentureLvGetListResp) ProtoMessage() {} + +func (x *VentureLvGetListResp) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_msg_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 VentureLvGetListResp.ProtoReflect.Descriptor instead. +func (*VentureLvGetListResp) Descriptor() ([]byte, []int) { + return file_venture_venture_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *VentureLvGetListResp) GetData() *DBVentureLv { + if x != nil { + return x.Data + } + return nil +} + +type VenturLvRewardReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cid int32 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid"` // 配置表id +} + +func (x *VenturLvRewardReq) Reset() { + *x = VenturLvRewardReq{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VenturLvRewardReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VenturLvRewardReq) ProtoMessage() {} + +func (x *VenturLvRewardReq) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_msg_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 VenturLvRewardReq.ProtoReflect.Descriptor instead. +func (*VenturLvRewardReq) Descriptor() ([]byte, []int) { + return file_venture_venture_msg_proto_rawDescGZIP(), []int{6} +} + +func (x *VenturLvRewardReq) GetCid() int32 { + if x != nil { + return x.Cid + } + return 0 +} + +type VenturLvRewardResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBVentureLv `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Atno []*UserAtno `protobuf:"bytes,2,rep,name=atno,proto3" json:"atno"` +} + +func (x *VenturLvRewardResp) Reset() { + *x = VenturLvRewardResp{} + if protoimpl.UnsafeEnabled { + mi := &file_venture_venture_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VenturLvRewardResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VenturLvRewardResp) ProtoMessage() {} + +func (x *VenturLvRewardResp) ProtoReflect() protoreflect.Message { + mi := &file_venture_venture_msg_proto_msgTypes[7] + 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 VenturLvRewardResp.ProtoReflect.Descriptor instead. +func (*VenturLvRewardResp) Descriptor() ([]byte, []int) { + return file_venture_venture_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *VenturLvRewardResp) GetData() *DBVentureLv { + if x != nil { + return x.Data + } + return nil +} + +func (x *VenturLvRewardResp) GetAtno() []*UserAtno { + if x != nil { + return x.Atno + } + return nil +} + +var File_venture_venture_msg_proto protoreflect.FileDescriptor + +var file_venture_venture_msg_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x2f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x76, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x65, 0x2f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x62, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, + 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x3c, 0x0a, 0x16, 0x56, 0x65, + 0x6e, 0x74, 0x75, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x53, 0x69, + 0x67, 0x6e, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x28, 0x0a, 0x14, 0x56, 0x65, 0x6e, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64, + 0x61, 0x79, 0x22, 0x5a, 0x0a, 0x15, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x53, 0x69, 0x67, + 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x73, + 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x56, 0x65, + 0x6e, 0x74, 0x75, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x12, + 0x1d, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x22, 0x15, + 0x0a, 0x13, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x76, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x38, 0x0a, 0x14, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, + 0x4c, 0x76, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, + 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x76, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x25, 0x0a, 0x11, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x12, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x56, + 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x76, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, + 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_venture_venture_msg_proto_rawDescOnce sync.Once + file_venture_venture_msg_proto_rawDescData = file_venture_venture_msg_proto_rawDesc +) + +func file_venture_venture_msg_proto_rawDescGZIP() []byte { + file_venture_venture_msg_proto_rawDescOnce.Do(func() { + file_venture_venture_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_venture_venture_msg_proto_rawDescData) + }) + return file_venture_venture_msg_proto_rawDescData +} + +var file_venture_venture_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_venture_venture_msg_proto_goTypes = []interface{}{ + (*VentureSignGetListReq)(nil), // 0: VentureSignGetListReq + (*VentureSignGetListResp)(nil), // 1: VentureSignGetListResp + (*VentureSignRewardReq)(nil), // 2: VentureSignRewardReq + (*VentureSignRewardResp)(nil), // 3: VentureSignRewardResp + (*VentureLvGetListReq)(nil), // 4: VentureLvGetListReq + (*VentureLvGetListResp)(nil), // 5: VentureLvGetListResp + (*VenturLvRewardReq)(nil), // 6: VenturLvRewardReq + (*VenturLvRewardResp)(nil), // 7: VenturLvRewardResp + (*DBVentureSign)(nil), // 8: DBVentureSign + (*UserAtno)(nil), // 9: UserAtno + (*DBVentureLv)(nil), // 10: DBVentureLv +} +var file_venture_venture_msg_proto_depIdxs = []int32{ + 8, // 0: VentureSignGetListResp.sign:type_name -> DBVentureSign + 8, // 1: VentureSignRewardResp.sign:type_name -> DBVentureSign + 9, // 2: VentureSignRewardResp.atno:type_name -> UserAtno + 10, // 3: VentureLvGetListResp.data:type_name -> DBVentureLv + 10, // 4: VenturLvRewardResp.data:type_name -> DBVentureLv + 9, // 5: VenturLvRewardResp.atno:type_name -> UserAtno + 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 +} + +func init() { file_venture_venture_msg_proto_init() } +func file_venture_venture_msg_proto_init() { + if File_venture_venture_msg_proto != nil { + return + } + file_venture_venture_db_proto_init() + file_comm_proto_init() + if !protoimpl.UnsafeEnabled { + file_venture_venture_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VentureSignGetListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_venture_venture_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VentureSignGetListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_venture_venture_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VentureSignRewardReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_venture_venture_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VentureSignRewardResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_venture_venture_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VentureLvGetListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_venture_venture_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VentureLvGetListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_venture_venture_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VenturLvRewardReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_venture_venture_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VenturLvRewardResp); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_venture_venture_msg_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_venture_venture_msg_proto_goTypes, + DependencyIndexes: file_venture_venture_msg_proto_depIdxs, + MessageInfos: file_venture_venture_msg_proto_msgTypes, + }.Build() + File_venture_venture_msg_proto = out.File + file_venture_venture_msg_proto_rawDesc = nil + file_venture_venture_msg_proto_goTypes = nil + file_venture_venture_msg_proto_depIdxs = nil +} diff --git a/services/worker/main.go b/services/worker/main.go index e4e3d92b0..509f14fa2 100644 --- a/services/worker/main.go +++ b/services/worker/main.go @@ -60,8 +60,10 @@ import ( "go_dreamfactory/modules/storyline" "go_dreamfactory/modules/sys" "go_dreamfactory/modules/tools" + "go_dreamfactory/modules/turntable" "go_dreamfactory/modules/uigame" "go_dreamfactory/modules/user" + "go_dreamfactory/modules/venture" "go_dreamfactory/modules/viking" "go_dreamfactory/modules/warorder" "go_dreamfactory/modules/weektask" @@ -160,6 +162,8 @@ func main() { weektask.NewModule(), dragon.NewModule(), capturesheep.NewModule(), + turntable.NewModule(), + venture.NewModule(), ) }