From 6a20b847de25e39d02c5913e5393cae870ddcf90 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 8 Aug 2023 15:49:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=B8=B8=E6=88=8F=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 3 + modules/activity/api_getlist.go | 9 ++- modules/uigame/api.go | 39 +++++++++++ modules/uigame/api_getlist.go | 23 +++++++ modules/uigame/comp_configure.go | 65 ++++++++++++++++++ modules/uigame/model_uigame.go | 55 ++++++++++++++++ modules/uigame/module.go | 44 +++++++++++++ modules/viking/comp_configure.go | 1 - pb/activity_db.pb.go | 16 ++++- pb/activity_msg.pb.go | 110 +++++++++++++++++-------------- services/worker/main.go | 2 + 11 files changed, 313 insertions(+), 54 deletions(-) create mode 100644 modules/uigame/api.go create mode 100644 modules/uigame/api_getlist.go create mode 100644 modules/uigame/comp_configure.go create mode 100644 modules/uigame/model_uigame.go create mode 100644 modules/uigame/module.go diff --git a/comm/const.go b/comm/const.go index 6ea376cd4..278b0af92 100644 --- a/comm/const.go +++ b/comm/const.go @@ -103,6 +103,7 @@ const ( ModuleStoryLine core.M_Modules = "storyline" //剧情活动 ModuleDreamwarorder core.M_Modules = "dreamwarorder" //如梦战令 ModulePushgiftbag core.M_Modules = "pushgiftbag" //推送礼包 + ModulePuzzle core.M_Modules = "puzzle" //拼图小游戏 ) // 数据表名定义处 @@ -342,6 +343,8 @@ const ( //推送礼包 TablekfPushGiftbag = "pushgiftbag" + + TableGamePuzzle = "puzzle" ) // RPC服务接口定义处 diff --git a/modules/activity/api_getlist.go b/modules/activity/api_getlist.go index 7119fe99d..2a2625b97 100644 --- a/modules/activity/api_getlist.go +++ b/modules/activity/api_getlist.go @@ -14,18 +14,23 @@ func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.ActivityGet // 获取所有活动信息 func (this *apiComp) GetList(session comm.IUserSession, req *pb.ActivityGetListReq) (errdata *pb.ErrorData) { var ( - data []*pb.DBHuodong + data []*pb.DBHuodong + hdlist []*pb.DBActivityData ) list := this.module.modelhdList.getHdInfo() for _, szhd := range list { for _, v := range szhd { data = append(data, v) + if c, err := this.module.modelhdData.getHddataByOid(session.GetUserId(), v.Id); err == nil { + hdlist = append(hdlist, c) + } } } session.SendMsg(string(this.module.GetType()), "getlist", &pb.ActivityGetListResp{ - Data: data, + Hddata: data, + Actdata: hdlist, }) return } diff --git a/modules/uigame/api.go b/modules/uigame/api.go new file mode 100644 index 000000000..ef696bd1e --- /dev/null +++ b/modules/uigame/api.go @@ -0,0 +1,39 @@ +package uigame + +import ( + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +const ( + VikingGetListResp = "getlist" + VikingChallengeResp = "challenge" + VikingChallengeOverResp = "challengeover" + VikingSkillLvResp = "skilllv" + VikingGetRewardResp = "getreward" + VikingBuyResp = "buy" + VikingRankListResp = "ranklist" + VikingSeasonRankReq = "seasonrank" +) + +type apiComp struct { + modules.MCompGate + service core.IService + configure *configureComp + module *UiGame +} + +//组件初始化接口 +func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompGate.Init(service, module, comp, options) + this.module = module.(*UiGame) + + this.service = service + return +} + +func (this *apiComp) Start() (err error) { + err = this.MCompGate.Start() + + return +} diff --git a/modules/uigame/api_getlist.go b/modules/uigame/api_getlist.go new file mode 100644 index 000000000..520d93ec6 --- /dev/null +++ b/modules/uigame/api_getlist.go @@ -0,0 +1,23 @@ +package uigame + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +//参数校验 +func (this *apiComp) GetPuzzleCheck(session comm.IUserSession, req *pb.UiGameGetPuzzleReq) (errdata *pb.ErrorData) { + + return +} + +func (this *apiComp) GetPuzzle(session comm.IUserSession, req *pb.UiGameGetPuzzleReq) (errdata *pb.ErrorData) { + if errdata = this.GetPuzzleCheck(session, req); errdata != nil { + return // 参数校验失败直接返回 + } + + list, _ := this.module.modelPuzzle.getPuzzleList(session.GetUserId(), req.Hdid) + + session.SendMsg(string(this.module.GetType()), "getpuzzle", &pb.UiGameGetPuzzleResp{Data: list}) + return +} diff --git a/modules/uigame/comp_configure.go b/modules/uigame/comp_configure.go new file mode 100644 index 000000000..ed3a4bd89 --- /dev/null +++ b/modules/uigame/comp_configure.go @@ -0,0 +1,65 @@ +package uigame + +import ( + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" + "go_dreamfactory/modules" + "go_dreamfactory/sys/configure" + cfg "go_dreamfactory/sys/configure/structs" + "sync" +) + +var moduleName = "viking" + +const ( + game_puzzle = "game_uigamepuzzle.json" +) + +///配置管理基础组件 +type configureComp struct { + module *UiGame + hlock sync.RWMutex + modules.MCompConfigure +} + +//组件初始化接口 +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.(*UiGame) + err = this.LoadMultiConfigure(map[string]interface{}{ + game_puzzle: cfg.NewGameUiGamePuzzle, + }) + + return +} + +//加载多个配置文件 +func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) { + for k, v := range confs { + err = configure.RegisterConfigure(k, v, nil) + if err != nil { + log.Errorf("配置文件:%s解析失败!", k) + break + } + } + return +} + +//读取配置数据 +func (this *configureComp) GetConfigure(name string) (v interface{}, err error) { + return configure.GetConfigure(name) +} +func (this *configureComp) GetPuzzleConf(id int32) (conf *cfg.GameUiGamePuzzleData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_puzzle); err == nil { + if configure, ok := v.(*cfg.GameUiGamePuzzle); ok { + if conf = configure.Get(id); conf != nil { + return + } + } + } + this.module.Errorf("GetPuzzleConf conf not found key :%d", id) + return +} diff --git a/modules/uigame/model_uigame.go b/modules/uigame/model_uigame.go new file mode 100644 index 000000000..d68d35d20 --- /dev/null +++ b/modules/uigame/model_uigame.go @@ -0,0 +1,55 @@ +package uigame + +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 modelPuzzle struct { + modules.MCompModel + module *UiGame +} + +func (this *modelPuzzle) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + this.TableName = string(comm.TableGamePuzzle) + err = this.MCompModel.Init(service, module, comp, options) + this.module = module.(*UiGame) + // uid 创建索引 + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +func (this *modelPuzzle) getPuzzleList(uid string, hid string) (result *pb.DBPuzzleData, err error) { + result = &pb.DBPuzzleData{} + if err = this.Get(uid, result); err != nil { + if mgo.MongodbNil == err { + result = &pb.DBPuzzleData{ + Id: primitive.NewObjectID().Hex(), + Uid: uid, + Hdoid: hid, + Gotarr: map[int32]int32{}, + Puzzle: map[int32]int32{}, + Lasttime: 0, + Val: 0, + } + err = nil + this.module.modelPuzzle.Add(uid, result) + } + return + } + err = nil + return result, err +} + +func (this *modelPuzzle) modifyVikingDataByObjId(uid string, data map[string]interface{}) error { + return this.Change(uid, data) +} diff --git a/modules/uigame/module.go b/modules/uigame/module.go new file mode 100644 index 000000000..c84d57e22 --- /dev/null +++ b/modules/uigame/module.go @@ -0,0 +1,44 @@ +package uigame + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/base" + "go_dreamfactory/lego/core" + + "go_dreamfactory/modules" +) + +type UiGame struct { + modules.ModuleBase + modelPuzzle *modelPuzzle + api *apiComp + configure *configureComp + service base.IRPCXService +} + +func NewModule() core.IModule { + return &UiGame{} +} + +func (this *UiGame) GetType() core.M_Modules { + return comm.ModulePuzzle +} + +func (this *UiGame) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { + err = this.ModuleBase.Init(service, module, options) + this.service = service.(base.IRPCXService) + return +} + +func (this *UiGame) OnInstallComp() { + this.ModuleBase.OnInstallComp() + this.api = this.RegisterComp(new(apiComp)).(*apiComp) + this.modelPuzzle = this.RegisterComp(new(modelPuzzle)).(*modelPuzzle) + this.configure = this.RegisterComp(new(configureComp)).(*configureComp) +} + +func (this *UiGame) Start() (err error) { + err = this.ModuleBase.Start() + + return +} diff --git a/modules/viking/comp_configure.go b/modules/viking/comp_configure.go index 44e9da455..e7d795f1a 100644 --- a/modules/viking/comp_configure.go +++ b/modules/viking/comp_configure.go @@ -45,7 +45,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp return }) - this.GetVikingBossAllData() return } diff --git a/pb/activity_db.pb.go b/pb/activity_db.pb.go index 953a0f275..fae54d28a 100644 --- a/pb/activity_db.pb.go +++ b/pb/activity_db.pb.go @@ -36,6 +36,9 @@ const ( // 特殊类型活动 只受活动开启限制 具体玩法 走excel 配置 HdType_HdTypeTurntable HdType = 1001 //大转盘 HdType_HdCelebration HdType = 1002 // 庆典活动 + HdType_HdPuzzle HdType = 1003 // 拼图小游戏 + HdType_HdLattice HdType = 1004 // 迷宫小游戏 + HdType_HdMiner HdType = 1005 // 矿工小游戏 ) // Enum value maps for HdType. @@ -53,6 +56,9 @@ var ( 10: "AddUpRecharge", 1001: "HdTypeTurntable", 1002: "HdCelebration", + 1003: "HdPuzzle", + 1004: "HdLattice", + 1005: "HdMiner", } HdType_value = map[string]int32{ "HdTypeNull": 0, @@ -67,6 +73,9 @@ var ( "AddUpRecharge": 10, "HdTypeTurntable": 1001, "HdCelebration": 1002, + "HdPuzzle": 1003, + "HdLattice": 1004, + "HdMiner": 1005, } ) @@ -542,7 +551,7 @@ var file_activity_activity_db_proto_rawDesc = []byte{ 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, 0x2a, 0xdc, 0x01, 0x0a, 0x06, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, + 0x01, 0x2a, 0x89, 0x02, 0x0a, 0x06, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x50, 0x61, 0x79, 0x10, 0x02, 0x12, @@ -556,7 +565,10 @@ var file_activity_activity_db_proto_rawDesc = []byte{ 0x61, 0x72, 0x67, 0x65, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x54, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xe9, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x64, 0x43, 0x65, 0x6c, 0x65, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xea, 0x07, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x64, 0x50, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x10, 0xeb, 0x07, 0x12, + 0x0e, 0x0a, 0x09, 0x48, 0x64, 0x4c, 0x61, 0x74, 0x74, 0x69, 0x63, 0x65, 0x10, 0xec, 0x07, 0x12, + 0x0c, 0x0a, 0x07, 0x48, 0x64, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x10, 0xed, 0x07, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/activity_msg.pb.go b/pb/activity_msg.pb.go index f70cfac90..4a7211e6b 100644 --- a/pb/activity_msg.pb.go +++ b/pb/activity_msg.pb.go @@ -64,7 +64,8 @@ type ActivityGetListResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []*DBHuodong `protobuf:"bytes,1,rep,name=data,proto3" json:"data"` + Hddata []*DBHuodong `protobuf:"bytes,1,rep,name=hddata,proto3" json:"hddata"` + Actdata []*DBActivityData `protobuf:"bytes,2,rep,name=actdata,proto3" json:"actdata"` // } func (x *ActivityGetListResp) Reset() { @@ -99,9 +100,16 @@ func (*ActivityGetListResp) Descriptor() ([]byte, []int) { return file_activity_activity_msg_proto_rawDescGZIP(), []int{1} } -func (x *ActivityGetListResp) GetData() []*DBHuodong { +func (x *ActivityGetListResp) GetHddata() []*DBHuodong { if x != nil { - return x.Data + return x.Hddata + } + return nil +} + +func (x *ActivityGetListResp) GetActdata() []*DBActivityData { + if x != nil { + return x.Actdata } return nil } @@ -482,42 +490,45 @@ var file_activity_activity_msg_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, - 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x13, 0x41, + 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x64, 0x0a, 0x13, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x28, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x65, - 0x74, 0x48, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x22, 0x3c, 0x0a, 0x15, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x48, 0x64, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x14, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6f, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x5b, 0x0a, 0x15, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 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, 0x22, 0x2e, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, - 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x22, 0x0a, 0x06, 0x68, 0x64, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x52, 0x06, + 0x68, 0x64, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x61, 0x63, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x22, 0x28, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, + 0x48, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x22, 0x3c, 0x0a, 0x15, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x48, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x14, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6f, 0x69, 0x64, 0x22, 0x7b, 0x0a, 0x1b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, - 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, - 0x61, 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, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x72, 0x61, 0x77, 0x6b, 0x65, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x72, 0x61, 0x77, 0x6b, 0x65, 0x79, - 0x22, 0x3d, 0x0a, 0x16, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x5b, 0x0a, 0x15, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, + 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 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, 0x22, 0x2e, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, 0x75, + 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, + 0x69, 0x64, 0x22, 0x7b, 0x0a, 0x1b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, 0x75, + 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, + 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, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x72, 0x61, 0x77, 0x6b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x72, 0x61, 0x77, 0x6b, 0x65, 0x79, 0x22, + 0x3d, 0x0a, 0x16, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -548,18 +559,19 @@ var file_activity_activity_msg_proto_goTypes = []interface{}{ (*UserAtno)(nil), // 11: UserAtno } var file_activity_activity_msg_proto_depIdxs = []int32{ - 9, // 0: ActivityGetListResp.data:type_name -> DBHuodong - 10, // 1: ActivityGetHdDataResp.data:type_name -> DBActivityData - 10, // 2: ActivityGetRewardResp.data:type_name -> DBActivityData - 11, // 3: ActivityGetRewardResp.atno:type_name -> UserAtno - 10, // 4: ActivityTurntableRewardResp.data:type_name -> DBActivityData - 11, // 5: ActivityTurntableRewardResp.atno:type_name -> UserAtno - 10, // 6: ActivityDataChangePush.data:type_name -> DBActivityData - 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 + 9, // 0: ActivityGetListResp.hddata:type_name -> DBHuodong + 10, // 1: ActivityGetListResp.actdata:type_name -> DBActivityData + 10, // 2: ActivityGetHdDataResp.data:type_name -> DBActivityData + 10, // 3: ActivityGetRewardResp.data:type_name -> DBActivityData + 11, // 4: ActivityGetRewardResp.atno:type_name -> UserAtno + 10, // 5: ActivityTurntableRewardResp.data:type_name -> DBActivityData + 11, // 6: ActivityTurntableRewardResp.atno:type_name -> UserAtno + 10, // 7: ActivityDataChangePush.data:type_name -> DBActivityData + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_activity_activity_msg_proto_init() } diff --git a/services/worker/main.go b/services/worker/main.go index 3adb9d7dd..9520e364c 100644 --- a/services/worker/main.go +++ b/services/worker/main.go @@ -58,6 +58,7 @@ import ( "go_dreamfactory/modules/sys" "go_dreamfactory/modules/task" "go_dreamfactory/modules/tools" + "go_dreamfactory/modules/uigame" "go_dreamfactory/modules/user" "go_dreamfactory/modules/viking" "go_dreamfactory/modules/warorder" @@ -152,6 +153,7 @@ func main() { addrecharge.NewModule(), storyline.NewModule(), pushgiftbag.NewModule(), + uigame.NewModule(), ) }