This commit is contained in:
liwei1dao 2023-09-07 18:59:03 +08:00
commit d5d9fbb785
28 changed files with 2392 additions and 290 deletions

View File

@ -108,6 +108,8 @@ const (
ModuleBattleRecord core.M_Modules = "battlerecord" //战斗记录
ModuleDragon core.M_Modules = "dragon" //坐骑
ModuleCaptureSheep core.M_Modules = "capturesheep" //捕羊大赛
ModuleTurntable core.M_Modules = "turntable" //
ModuleVenture core.M_Modules = "venture" //
)
// 数据表名定义处
@ -371,6 +373,11 @@ const (
TableCapturesheep = "capturesheep"
//捕羊大赛排名
TableCapturesheepRank = "capturesheeprank" //排名
TableTurntable = "turntable"
TableVentureSign = "venturesign"
TableVentureLv = "venturelv"
)
// RPC服务接口定义处
@ -1053,3 +1060,13 @@ const (
Caddtime string = "caddtime"
Csubtime string = "csubtime"
)
// 条件开启枚举
type OpencondType int32
const (
OpencondTypePlatlv OpencondType = 1
OpencondTypeMaxmapid OpencondType = 2
OpencondTypeWorldtaskid OpencondType = 3
OpencondTypeFriend OpencondType = 4
)

View File

@ -42,7 +42,7 @@ type (
type (
ISys interface {
ValidCond(uid string, conf *cfg.GameOpencondData) string
CheckLvUpCond(session IUserSession, lv int32)
CheckOpenCond(session IUserSession, itype OpencondType, value int32)
// 查询opencond 配置
CheckOpenCondCfgById(uid string, id string) (bOpen bool, errdata *pb.ErrorData)

View File

@ -1,116 +0,0 @@
package activity
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
)
//参数校验
func (this *apiComp) TurntableRewardCheck(session comm.IUserSession, req *pb.ActivityTurntableRewardReq) (errdata *pb.ErrorData) {
if req.Oid == "" {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
return
}
// 大转盘抽奖
func (this *apiComp) TurntableReward(session comm.IUserSession, req *pb.ActivityTurntableRewardReq) (errdata *pb.ErrorData) {
if errdata = this.TurntableRewardCheck(session, req); errdata != nil {
return
}
var (
activity *pb.DBHuodong // 活动数据
err error
atno []*pb.UserAtno
reward []int32
need []*cfg.Gameatn
)
//key := fmt.Sprintf("%s-%s", session.GetUserId(), req.Oid)
data, err := this.module.modelhdData.getHddataByOid(session.GetUserId(), req.Oid)
if err == nil {
if activity, err = this.module.modelhdList.getHdListByHdId(req.Oid); err == nil {
curTime := configure.Now().Unix()
if activity.Stime > curTime || curTime > activity.Etime { //不在活动时间范围内
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityNotIntime,
Title: pb.ErrorCode_ActivityNotIntime.ToString(),
}
return
}
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityInvalid,
Title: pb.ErrorCode_ActivityInvalid.ToString(),
}
return
}
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
}
return
}
// 消耗校验
pricekey := this.module.ModuleTools.GetGlobalConf().GiftBuy
if res, err := this.module.ModuleTools.GetPriceGroupCost(pricekey, data.Val+1); len(res) > 0 {
need = append(need, res...)
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
if errdata = this.module.CheckRes(session, need); errdata != nil { // 资源不足
return
}
if data.Val >= this.module.configure.GetMaxTurntableCount() { // 领取校验
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
}
return
}
for k := range data.Gotarr {
reward = append(reward, k)
}
// 发奖
item, drawkey, err := this.module.Turntable(data.Val+1, reward)
if err == nil {
if errdata, atno = this.module.DispenseAtno(session, []*cfg.Gameatn{item}, true); errdata != nil {
return
}
// 修改进度
data.Gotarr[drawkey] = 1
data.Val += 1
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
}
return
}
if errdata = this.module.ConsumeRes(session, need, true); errdata != nil { // 资源不足
return
}
update := make(map[string]interface{})
update["gotarr"] = data.Gotarr
update["val"] = data.Val
this.module.modelhdData.ModifyActivityList(session.GetUserId(), data.Id, update)
session.SendMsg(string(this.module.GetType()), "turntablereward", &pb.ActivityTurntableRewardResp{
Data: data,
Atno: atno,
Drawkey: drawkey,
})
return
}

View File

@ -11,8 +11,7 @@ import (
)
const (
venturegiftsdraw = "game_venturegiftsdraw.json" //大转盘
hdcelebration = "game_celebration.json" //开服庆典
hdcelebration = "game_celebration.json"
)
// /配置管理基础组件
@ -29,34 +28,9 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Activity)
err = this.LoadMultiConfigure(map[string]interface{}{
venturegiftsdraw: cfg.NewGameVenturegiftsDraw,
hdcelebration: cfg.NewGameCelebration,
hdcelebration: cfg.NewGameCelebration,
})
configure.RegisterConfigure(venturegiftsdraw, cfg.NewGameVenturegiftsDraw, func() {
var pool1 string
if v, err := this.GetConfigure(venturegiftsdraw); err == nil {
this.hlock.Lock()
this.pool1 = make(map[int32]*cfg.GameVenturegiftsDrawData)
this.pool2 = make(map[int32]*cfg.GameVenturegiftsDrawData)
defer this.hlock.Unlock()
if _configure, ok := v.(*cfg.GameVenturegiftsDraw); ok {
for _, v := range _configure.GetDataList() {
if pool1 == "" {
pool1 = v.DrawType
}
if pool1 == v.DrawType {
this.pool1[v.Drawkey] = v
} else {
this.pool2[v.Drawkey] = v
}
}
return
}
} else {
err = fmt.Errorf("%T no is *cfg.GameHeroAwaken", v)
}
})
return
}
@ -77,29 +51,6 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
return configure.GetConfigure(name)
}
// 获取抽奖数据
func (this *configureComp) GetVenturegiftsDraw(id int32) (configure *cfg.GameVenturegiftsDrawData, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(venturegiftsdraw); err == nil {
if configure, ok = v.(*cfg.GameVenturegiftsDraw).GetDataMap()[id]; !ok {
err = fmt.Errorf("%T no is *cfg.GameVenturegiftsDrawData", v)
return
}
}
return
}
func (this *configureComp) GetPool1() (m map[int32]*cfg.GameVenturegiftsDrawData) {
return this.pool1
}
func (this *configureComp) GetPool2() (m map[int32]*cfg.GameVenturegiftsDrawData) {
return this.pool2
}
// id
func (this *configureComp) GetHDCelebration(id int32) (conf *cfg.GameCelebrationData, err error) {
var (
@ -124,7 +75,3 @@ func (this *configureComp) GetHDCelebrationData() (days []int32) {
}
return
}
func (this *configureComp) GetMaxTurntableCount() (count int32) {
return int32(len(this.pool1) + len(this.pool2))
}

View File

@ -6,12 +6,11 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/sys/db"
"go_dreamfactory/utils"
@ -89,7 +88,7 @@ func (this *Activity) Start() (err error) {
return
}
this.kftask = module.(comm.IActivityNotice)
event.RegisterGO(comm.EventUserLogin, this.EventUserLogin)
if !db.IsCross() {
this.modelhdList.LoadActivityData()
for k, v := range this.modelhdList.activity {
@ -194,54 +193,6 @@ func (this *Activity) GetHdInfoByHdId(oid string) (result *pb.DBHuodong, err err
return
}
// 大转盘奖励
func (this *Activity) Turntable(drawIndex int32, reward []int32) (item *cfg.Gameatn, drawkey int32, err error) {
var (
conf *cfg.GameVenturegiftsDrawData
szW []int32 // 权重
szpool []int32 // drawkey
)
if conf, err = this.configure.GetVenturegiftsDraw(drawIndex); err != nil {
return
}
// 过滤已经获得的道具
for _, v := range this.configure.pool1 {
bFound := false
for _, v1 := range reward {
if v.Drawkey == v1 {
bFound = true
break
}
}
if !bFound {
szW = append(szW, v.Weight)
szpool = append(szpool, v.Drawkey)
}
}
if conf.Type == 2 {
for _, v := range this.configure.pool2 {
bFound := false
for _, v1 := range reward {
if v.Drawkey == v1 {
bFound = true
break
}
}
if !bFound {
szW = append(szW, v.Weight)
szpool = append(szpool, v.Drawkey)
}
}
}
if c, err := this.configure.GetVenturegiftsDraw(szpool[comm.GetRandW(szW)]); err == nil {
item = c.Id // 最终获得的道具
drawkey = c.Drawkey
}
return
}
// 统计庆典活动完成情况
func (this *Activity) HDCelebration(session comm.IUserSession, systemtype int32, bosstype int32) bool {
bDouble := false // 是否开启双倍奖励
@ -251,7 +202,6 @@ func (this *Activity) HDCelebration(session comm.IUserSession, systemtype int32,
update := make(map[string]interface{})
bChange := false
// 查询玩家活动记录
//key := fmt.Sprintf("%s-%s", session.GetUserId(), v.Id)
if data, err := this.modelhdData.getHddataByOid(session.GetUserId(), activity.Id); err == nil {
// 注意 Gotarr:map[int32]int32 key value 已经挑战的次数
if !utils.IsToday(data.Lasttime) { // 不是今天重置
@ -323,42 +273,10 @@ func (this *Activity) HDCelebration(session comm.IUserSession, systemtype int32,
}
}
}
// }
}
return bDouble
}
func (this *Activity) EventUserLogin(session comm.IUserSession) {
// 转盘活动
if a, err := this.GetHdInfoByItype(pb.HdType_HdTypeTurntable); err == nil { //
bEnd := false
// for _, v := range a {
if configure.Now().Unix() > a.Etime {
bEnd = true
}
// }
if bEnd { // 活动结束 活动道具转换
t := this.ModuleTools.GetGlobalConf().VenturegiftsDraw
var reward []*pb.UserAssets
if item, err := this.configure.GetItemConfigureData(t); err != nil {
amount := this.ModuleItems.QueryItemAmount(session.GetUserId(), t)
if amount > 0 {
this.ModuleItems.AddItem(session, t, -int32(amount), true)
for _, v := range item.Sale {
reward = append(reward, &pb.UserAssets{
A: v.A,
T: v.T,
N: v.N * int32(amount),
})
}
// 发邮件
this.mail.SendMailByCid(session, comm.Venturegifts, reward)
}
}
}
}
}
func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (result []*pb.DBActivityData) {
var (
activity *pb.DBHuodong
@ -372,32 +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_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 {
if user := this.ModuleUser.GetUser(session.GetUserId()); user != nil {
if list.Val != user.Lv {
list.Val = user.Lv
list.Lasttime = curTime
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_HdCelebration {

View File

@ -219,7 +219,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
module, err2 := this.module.service.GetModule(comm.ModuleSys)
if err2 == nil {
if isys, ok := module.(comm.ISys); ok {
isys.CheckLvUpCond(session, req.StageId) // 校验新功能是否开启
isys.CheckOpenCond(session, comm.OpencondTypeMaxmapid, req.StageId) // 校验新功能是否开启
}
}
// 主线任务统计 Rtype60

View File

@ -67,18 +67,26 @@ func (this *configureComp) LoadCondConfig() {
}
func (this *configureComp) GetOpencondLv(lv int32) []string {
this.hlock.RLock()
defer this.hlock.RUnlock()
return this.maplv[lv]
}
func (this *configureComp) getOpencondMline(id int32) []string {
this.hlock.RLock()
defer this.hlock.RUnlock()
return this.mapmline[id]
}
func (this *configureComp) getOpencondTask(id int32) []string {
this.hlock.RLock()
defer this.hlock.RUnlock()
return this.maptask[id]
}
func (this *configureComp) getFriendTask(id int32) []string {
this.hlock.RLock()
defer this.hlock.RUnlock()
return this.mapfriend[id]
}
func (this *configureComp) getOpencondCfg() (data *cfg.GameOpencond, err error) {

View File

@ -19,10 +19,8 @@ type ModuleSys struct {
service base.IRPCXService
modelSys *ModelSys
mainline comm.IMainline
pagoda comm.IPagoda
sociaty comm.ISociaty
pagoda comm.IPagoda
sociaty comm.ISociaty
}
func NewModule() core.IModule {
@ -80,9 +78,13 @@ func (this *ModuleSys) ValidCond(uid string, conf *cfg.GameOpencondData) string
return this.modelSys.validCond(uid, conf)
}
func (this *ModuleSys) CheckLvUpCond(session comm.IUserSession, lv int32) {
if cond := this.configure.GetOpencondLv(lv); len(cond) > 0 {
this.AutoActivate(session, cond)
func (this *ModuleSys) CheckOpenCond(session comm.IUserSession, itype comm.OpencondType, value int32) {
switch itype {
case comm.OpencondTypePlatlv:
case comm.OpencondTypeMaxmapid:
case comm.OpencondTypeWorldtaskid:
case comm.OpencondTypeFriend:
}
}
@ -105,7 +107,6 @@ func (this *ModuleSys) AutoActivate(session comm.IUserSession, cids []string) bo
szOpen = append(szOpen, cid)
}
}
}
if len(szOpen) > 0 {
this.modelSys.ChangeOpenCondData(session.GetUserId(), map[string]interface{}{

20
modules/turntable/api.go Normal file
View File

@ -0,0 +1,20 @@
package turntable
import (
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type apiComp struct {
modules.MCompGate
service base.IRPCXService
module *Turntable
}
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.(*Turntable)
return
}

View File

@ -0,0 +1,85 @@
package turntable
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
// 参数校验
func (this *apiComp) DrawCheck(session comm.IUserSession, req *pb.TurntableDrawReq) (errdata *pb.ErrorData) {
return
}
func (this *apiComp) Draw(session comm.IUserSession, req *pb.TurntableDrawReq) (errdata *pb.ErrorData) {
var (
err error
atno []*pb.UserAtno
reward []int32
need []*cfg.Gameatn
)
data, err := this.module.modelt.getUserTurntable(session.GetUserId())
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
}
return
}
// 消耗校验
pricekey := this.module.ModuleTools.GetGlobalConf().GiftBuy
if res, err := this.module.ModuleTools.GetPriceGroupCost(pricekey, int32(len(data.Data))+1); len(res) > 0 {
need = append(need, res...)
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
if errdata = this.module.CheckRes(session, need); errdata != nil { // 资源不足
return
}
if int32(len(data.Data)) >= this.module.configure.GetMaxTurntableCount() { // 领取校验
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
}
return
}
for k := range data.Data {
reward = append(reward, k)
}
// 发奖
item, drawkey, err := this.module.Turntable(int32(len(data.Data))+1, reward)
if err == nil {
if errdata, atno = this.module.DispenseAtno(session, []*cfg.Gameatn{item}, true); errdata != nil {
return
}
// 修改进度
data.Data[drawkey] = 1
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
}
return
}
if errdata = this.module.ConsumeRes(session, need, true); errdata != nil { // 资源不足
return
}
this.module.modelt.Change(session.GetUserId(), map[string]interface{}{
"data": data.Data,
})
session.SendMsg(string(this.module.GetType()), "draw", &pb.TurntableDrawResp{
Data: data,
Atno: atno,
Drawkey: drawkey,
})
return
}

View File

@ -0,0 +1,36 @@
package turntable
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
// 参数校验
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.TurntableGetListReq) (errdata *pb.ErrorData) {
return
}
func (this *apiComp) GetList(session comm.IUserSession, req *pb.TurntableGetListReq) (errdata *pb.ErrorData) {
var (
turntable *pb.DBTurntable
err error
)
if errdata = this.GetListCheck(session, req); errdata != nil {
return
}
if turntable, err = this.module.modelt.getUserTurntable(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()), "getlist", &pb.TurntableGetListResp{
Data: turntable,
})
return
}

View File

@ -0,0 +1,141 @@
package turntable
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"sync"
)
const (
game_venturegiftstask = "game_venturegiftstask.json"
venturegiftsdraw = "game_venturegiftsdraw.json" //大转盘
)
type configureComp struct {
modules.MCompConfigure
module *Turntable
lock sync.RWMutex
tasks map[int32]struct{}
groupTasks map[int32][]*cfg.GameVenturegiftsTaskData //key 条件ID
pool1 map[int32]*cfg.GameVenturegiftsDrawData
pool2 map[int32]*cfg.GameVenturegiftsDrawData
}
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.(*Turntable)
configure.RegisterConfigure(game_venturegiftstask, cfg.NewGameVenturegiftsTask, this.updateconfigure)
configure.RegisterConfigure(venturegiftsdraw, cfg.NewGameVenturegiftsDraw, this.updateconfigureDraw)
return
}
func (this *configureComp) gettasks() map[int32]struct{} {
this.lock.RLock()
defer this.lock.RUnlock()
return this.tasks
}
// 更新任务配置表
func (this *configureComp) updateconfigureDraw() {
var pool1 string
if v, err := this.GetConfigure(venturegiftsdraw); err == nil {
this.lock.Lock()
this.pool1 = make(map[int32]*cfg.GameVenturegiftsDrawData)
this.pool2 = make(map[int32]*cfg.GameVenturegiftsDrawData)
defer this.lock.Unlock()
if _configure, ok := v.(*cfg.GameVenturegiftsDraw); ok {
for _, v := range _configure.GetDataList() {
if pool1 == "" {
pool1 = v.DrawType
}
if pool1 == v.DrawType {
this.pool1[v.Drawkey] = v
} else {
this.pool2[v.Drawkey] = v
}
}
return
}
} else {
err = fmt.Errorf("%T no is *cfg.GameHeroAwaken", v)
}
}
func (this *configureComp) updateconfigure() {
var (
v interface{}
conf *cfg.GameVenturegiftsTask
ok bool
err error
)
if v, err = this.GetConfigure(game_venturegiftstask); err != nil {
return
}
if conf, ok = v.(*cfg.GameVenturegiftsTask); !ok {
this.module.Error("日常任务配置异常!")
return
}
tasks := make(map[int32]struct{})
groupTasksConf := make(map[int32][]*cfg.GameVenturegiftsTaskData)
for _, v := range conf.GetDataList() {
if _, ok := groupTasksConf[v.Openday]; !ok {
groupTasksConf[v.Openday] = make([]*cfg.GameVenturegiftsTaskData, 0)
}
groupTasksConf[v.Openday] = append(groupTasksConf[v.Openday], v)
tasks[v.Venturetask] = struct{}{}
}
this.lock.Lock()
this.groupTasks = groupTasksConf
this.tasks = tasks
this.lock.Unlock()
}
func (this *configureComp) getGameVenturegiftsTask(id int32) (conf *cfg.GameVenturegiftsTaskData, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(game_venturegiftstask); err != nil {
return
}
if conf, ok = v.(*cfg.GameVenturegiftsTask).GetDataMap()[id]; !ok {
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_venturegiftstask, id)
this.module.Errorln(err)
return
}
return
}
// 获取抽奖数据
func (this *configureComp) GetVenturegiftsDraw(id int32) (configure *cfg.GameVenturegiftsDrawData, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(venturegiftsdraw); err == nil {
if configure, ok = v.(*cfg.GameVenturegiftsDraw).GetDataMap()[id]; !ok {
err = fmt.Errorf("%T no is *cfg.GameVenturegiftsDrawData", v)
return
}
}
return
}
func (this *configureComp) GetPool1() (m map[int32]*cfg.GameVenturegiftsDrawData) {
return this.pool1
}
func (this *configureComp) GetPool2() (m map[int32]*cfg.GameVenturegiftsDrawData) {
return this.pool2
}
func (this *configureComp) GetMaxTurntableCount() (count int32) {
return int32(len(this.pool1) + len(this.pool2))
}

View File

@ -0,0 +1,45 @@
package turntable
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 ModelTurntable struct {
modules.MCompModel
module *Turntable
}
func (this *ModelTurntable) 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.TableTurntable
this.module = module.(*Turntable)
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
func (this *ModelTurntable) getUserTurntable(uid string) (results *pb.DBTurntable, err error) {
results = &pb.DBTurntable{}
if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil {
this.module.Errorln(err)
return
}
if err == mgo.MongodbNil {
results = &pb.DBTurntable{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Data: make(map[int32]int32),
}
err = this.Add(uid, results)
}
return
}

167
modules/turntable/module.go Normal file
View File

@ -0,0 +1,167 @@
package turntable
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
)
type Turntable struct {
modules.ModuleBase
service core.IService
api *apiComp
configure *configureComp
modelt *ModelTurntable
mail comm.Imail
open bool
}
func NewModule() core.IModule {
return &Turntable{}
}
func (this *Turntable) GetType() core.M_Modules {
return comm.ModuleTurntable
}
func (this *Turntable) 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 *Turntable) Start() (err error) {
err = this.ModuleBase.Start()
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleMail); err != nil {
return
}
this.mail = module.(comm.Imail)
if module, err = this.service.GetModule(comm.ModuleWarorder); err != nil {
return
}
event.RegisterGO(comm.EventUserLogin, this.EventUserLogin)
return
}
func (this *Turntable) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelt = this.RegisterComp(new(ModelTurntable)).(*ModelTurntable)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}
// 活动开启
func (this *Turntable) ActivityOpenNotice(hdlist *pb.DBHuodong) {
switch hdlist.Itype {
case pb.HdType_KFSevenTask:
this.open = true
break
}
}
// 活动关闭
func (this *Turntable) ActivityCloseNotice(hdlist *pb.DBHuodong) {
switch hdlist.Itype {
case pb.HdType_KFSevenTask:
this.open = false
break
}
}
// 大转盘奖励
func (this *Turntable) Turntable(drawIndex int32, reward []int32) (item *cfg.Gameatn, drawkey int32, err error) {
var (
conf *cfg.GameVenturegiftsDrawData
szW []int32 // 权重
szpool []int32 // drawkey
)
if conf, err = this.configure.GetVenturegiftsDraw(drawIndex); err != nil {
return
}
// 过滤已经获得的道具
for _, v := range this.configure.pool1 {
bFound := false
for _, v1 := range reward {
if v.Drawkey == v1 {
bFound = true
break
}
}
if !bFound {
szW = append(szW, v.Weight)
szpool = append(szpool, v.Drawkey)
}
}
if conf.Type == 2 {
for _, v := range this.configure.pool2 {
bFound := false
for _, v1 := range reward {
if v.Drawkey == v1 {
bFound = true
break
}
}
if !bFound {
szW = append(szW, v.Weight)
szpool = append(szpool, v.Drawkey)
}
}
}
if c, err := this.configure.GetVenturegiftsDraw(szpool[comm.GetRandW(szW)]); err == nil {
item = c.Id // 最终获得的道具
drawkey = c.Drawkey
}
return
}
func (this *Turntable) EventUserLogin(session comm.IUserSession) {
// 转盘活动
var (
bEnd bool
turntable *pb.DBTurntable
err error
)
if turntable, err = this.modelt.getUserTurntable(session.GetUserId()); err != nil {
return
}
if turntable.Reward {
return
}
endTime := 28 // 等配置
if user := this.ModuleUser.GetUser(session.GetUserId()); user != nil {
if configure.Now().Unix() > user.Ctime+int64(endTime*24*3600) {
bEnd = true
}
}
if bEnd { // 活动结束 活动道具转换
t := this.ModuleTools.GetGlobalConf().VenturegiftsDraw
var reward []*pb.UserAssets
if item, err := this.configure.GetItemConfigureData(t); err != nil {
amount := this.ModuleItems.QueryItemAmount(session.GetUserId(), t)
if amount > 0 {
this.ModuleItems.AddItem(session, t, -int32(amount), true)
for _, v := range item.Sale {
reward = append(reward, &pb.UserAssets{
A: v.A,
T: v.T,
N: v.N * int32(amount),
})
}
// 发邮件
this.mail.SendMailByCid(session, comm.Venturegifts, reward)
}
}
turntable.Reward = true
this.modelt.Change(session.GetUserId(), map[string]interface{}{
"reward": turntable.Reward,
})
}
}

20
modules/venture/api.go Normal file
View File

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

View File

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

View File

@ -0,0 +1,83 @@
package venture
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
// 参数校验
func (this *apiComp) LvRewardCheck(session comm.IUserSession, req *pb.VentureLvRewardReq) (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.VentureLvRewardReq) (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(),
}
return
}
if conf.Lvcondition > user.Lv { // 等级不够
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityCantReward,
Title: pb.ErrorCode_ActivityCantReward.ToString(),
}
return
}
if _, ok := ventureLv.Reward[req.Cid]; ok {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
}
return
}
if errdata, atno = this.module.DispenseAtno(session, []*cfg.Gameatn{conf.Reward}, true); errdata != nil {
return
}
ventureLv.Reward[req.Cid] = 1
this.module.ModelLv.Change(session.GetUserId(), map[string]interface{}{
"reward": ventureLv.Reward,
})
session.SendMsg(string(this.module.GetType()), "lvreward", &pb.VentureLvRewardResp{
Data: ventureLv,
Atno: atno,
})
return
}

View File

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

View File

@ -0,0 +1,74 @@
package venture
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
// 参数校验
func (this *apiComp) SignRewardCheck(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) SignReward(session comm.IUserSession, req *pb.VentureSignRewardReq) (errdata *pb.ErrorData) {
var (
err error
conf *cfg.GameVenturegiftsLoginData
sign *pb.DBVentureSign
atno []*pb.UserAtno
)
if errdata = this.SignRewardCheck(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(),
}
return
}
if _, ok := sign.Sign[req.Day]; ok {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
}
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
}

View File

@ -0,0 +1,66 @@
package venture
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/sys/configure"
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)
err = this.LoadMultiConfigure(map[string]interface{}{
game_venturegiflogin: cfg.NewGameVenturegiftsLogin,
game_venturegiftslvaward: cfg.NewGameVenturegiftsLvaward,
})
this.getGameVenturegiftsLogin(1)
return
}
//读取配置数据
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
return configure.GetConfigure(name)
}
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
}

View File

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

View File

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

44
modules/venture/module.go Normal file
View File

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

176
pb/turntable_db.pb.go Normal file
View File

@ -0,0 +1,176 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: turntable/turntable_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 DBTurntable 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"`
Data map[int32]int32 `protobuf:"bytes,3,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Reward bool `protobuf:"varint,4,opt,name=reward,proto3" json:"reward"` // 奖励是否补发
}
func (x *DBTurntable) Reset() {
*x = DBTurntable{}
if protoimpl.UnsafeEnabled {
mi := &file_turntable_turntable_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBTurntable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBTurntable) ProtoMessage() {}
func (x *DBTurntable) ProtoReflect() protoreflect.Message {
mi := &file_turntable_turntable_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 DBTurntable.ProtoReflect.Descriptor instead.
func (*DBTurntable) Descriptor() ([]byte, []int) {
return file_turntable_turntable_db_proto_rawDescGZIP(), []int{0}
}
func (x *DBTurntable) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DBTurntable) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBTurntable) GetData() map[int32]int32 {
if x != nil {
return x.Data
}
return nil
}
func (x *DBTurntable) GetReward() bool {
if x != nil {
return x.Reward
}
return false
}
var File_turntable_turntable_db_proto protoreflect.FileDescriptor
var file_turntable_turntable_db_proto_rawDesc = []byte{
0x0a, 0x1c, 0x74, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2f, 0x74, 0x75, 0x72, 0x6e,
0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac,
0x01, 0x0a, 0x0b, 0x44, 0x42, 0x54, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 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, 0x2a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x44, 0x42, 0x54, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x61, 0x74,
0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06,
0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65,
0x77, 0x61, 0x72, 0x64, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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_turntable_turntable_db_proto_rawDescOnce sync.Once
file_turntable_turntable_db_proto_rawDescData = file_turntable_turntable_db_proto_rawDesc
)
func file_turntable_turntable_db_proto_rawDescGZIP() []byte {
file_turntable_turntable_db_proto_rawDescOnce.Do(func() {
file_turntable_turntable_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_turntable_turntable_db_proto_rawDescData)
})
return file_turntable_turntable_db_proto_rawDescData
}
var file_turntable_turntable_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_turntable_turntable_db_proto_goTypes = []interface{}{
(*DBTurntable)(nil), // 0: DBTurntable
nil, // 1: DBTurntable.DataEntry
}
var file_turntable_turntable_db_proto_depIdxs = []int32{
1, // 0: DBTurntable.data:type_name -> DBTurntable.DataEntry
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_turntable_turntable_db_proto_init() }
func file_turntable_turntable_db_proto_init() {
if File_turntable_turntable_db_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_turntable_turntable_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBTurntable); 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_turntable_turntable_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_turntable_turntable_db_proto_goTypes,
DependencyIndexes: file_turntable_turntable_db_proto_depIdxs,
MessageInfos: file_turntable_turntable_db_proto_msgTypes,
}.Build()
File_turntable_turntable_db_proto = out.File
file_turntable_turntable_db_proto_rawDesc = nil
file_turntable_turntable_db_proto_goTypes = nil
file_turntable_turntable_db_proto_depIdxs = nil
}

342
pb/turntable_msg.pb.go Normal file
View File

@ -0,0 +1,342 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: turntable/turntable_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 TurntableGetListReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *TurntableGetListReq) Reset() {
*x = TurntableGetListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_turntable_turntable_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TurntableGetListReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TurntableGetListReq) ProtoMessage() {}
func (x *TurntableGetListReq) ProtoReflect() protoreflect.Message {
mi := &file_turntable_turntable_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 TurntableGetListReq.ProtoReflect.Descriptor instead.
func (*TurntableGetListReq) Descriptor() ([]byte, []int) {
return file_turntable_turntable_msg_proto_rawDescGZIP(), []int{0}
}
type TurntableGetListResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBTurntable `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
}
func (x *TurntableGetListResp) Reset() {
*x = TurntableGetListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_turntable_turntable_msg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TurntableGetListResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TurntableGetListResp) ProtoMessage() {}
func (x *TurntableGetListResp) ProtoReflect() protoreflect.Message {
mi := &file_turntable_turntable_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 TurntableGetListResp.ProtoReflect.Descriptor instead.
func (*TurntableGetListResp) Descriptor() ([]byte, []int) {
return file_turntable_turntable_msg_proto_rawDescGZIP(), []int{1}
}
func (x *TurntableGetListResp) GetData() *DBTurntable {
if x != nil {
return x.Data
}
return nil
}
// 大转盘活动领奖
type TurntableDrawReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *TurntableDrawReq) Reset() {
*x = TurntableDrawReq{}
if protoimpl.UnsafeEnabled {
mi := &file_turntable_turntable_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TurntableDrawReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TurntableDrawReq) ProtoMessage() {}
func (x *TurntableDrawReq) ProtoReflect() protoreflect.Message {
mi := &file_turntable_turntable_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 TurntableDrawReq.ProtoReflect.Descriptor instead.
func (*TurntableDrawReq) Descriptor() ([]byte, []int) {
return file_turntable_turntable_msg_proto_rawDescGZIP(), []int{2}
}
// 领取奖励数据返回
type TurntableDrawResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBTurntable `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
Atno []*UserAtno `protobuf:"bytes,2,rep,name=atno,proto3" json:"atno"`
Drawkey int32 `protobuf:"varint,3,opt,name=drawkey,proto3" json:"drawkey"`
}
func (x *TurntableDrawResp) Reset() {
*x = TurntableDrawResp{}
if protoimpl.UnsafeEnabled {
mi := &file_turntable_turntable_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TurntableDrawResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TurntableDrawResp) ProtoMessage() {}
func (x *TurntableDrawResp) ProtoReflect() protoreflect.Message {
mi := &file_turntable_turntable_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 TurntableDrawResp.ProtoReflect.Descriptor instead.
func (*TurntableDrawResp) Descriptor() ([]byte, []int) {
return file_turntable_turntable_msg_proto_rawDescGZIP(), []int{3}
}
func (x *TurntableDrawResp) GetData() *DBTurntable {
if x != nil {
return x.Data
}
return nil
}
func (x *TurntableDrawResp) GetAtno() []*UserAtno {
if x != nil {
return x.Atno
}
return nil
}
func (x *TurntableDrawResp) GetDrawkey() int32 {
if x != nil {
return x.Drawkey
}
return 0
}
var File_turntable_turntable_msg_proto protoreflect.FileDescriptor
var file_turntable_turntable_msg_proto_rawDesc = []byte{
0x0a, 0x1d, 0x74, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2f, 0x74, 0x75, 0x72, 0x6e,
0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x1c, 0x74, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2f, 0x74, 0x75, 0x72, 0x6e, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63,
0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, 0x0a, 0x13, 0x54, 0x75, 0x72,
0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
0x22, 0x38, 0x0a, 0x14, 0x54, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 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, 0x54, 0x75, 0x72, 0x6e, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x75,
0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x22, 0x6e,
0x0a, 0x11, 0x54, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x72, 0x61, 0x77, 0x52,
0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x54, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 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, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_turntable_turntable_msg_proto_rawDescOnce sync.Once
file_turntable_turntable_msg_proto_rawDescData = file_turntable_turntable_msg_proto_rawDesc
)
func file_turntable_turntable_msg_proto_rawDescGZIP() []byte {
file_turntable_turntable_msg_proto_rawDescOnce.Do(func() {
file_turntable_turntable_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_turntable_turntable_msg_proto_rawDescData)
})
return file_turntable_turntable_msg_proto_rawDescData
}
var file_turntable_turntable_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_turntable_turntable_msg_proto_goTypes = []interface{}{
(*TurntableGetListReq)(nil), // 0: TurntableGetListReq
(*TurntableGetListResp)(nil), // 1: TurntableGetListResp
(*TurntableDrawReq)(nil), // 2: TurntableDrawReq
(*TurntableDrawResp)(nil), // 3: TurntableDrawResp
(*DBTurntable)(nil), // 4: DBTurntable
(*UserAtno)(nil), // 5: UserAtno
}
var file_turntable_turntable_msg_proto_depIdxs = []int32{
4, // 0: TurntableGetListResp.data:type_name -> DBTurntable
4, // 1: TurntableDrawResp.data:type_name -> DBTurntable
5, // 2: TurntableDrawResp.atno:type_name -> UserAtno
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_turntable_turntable_msg_proto_init() }
func file_turntable_turntable_msg_proto_init() {
if File_turntable_turntable_msg_proto != nil {
return
}
file_turntable_turntable_db_proto_init()
file_comm_proto_init()
if !protoimpl.UnsafeEnabled {
file_turntable_turntable_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TurntableGetListReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_turntable_turntable_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TurntableGetListResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_turntable_turntable_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TurntableDrawReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_turntable_turntable_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TurntableDrawResp); 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_turntable_turntable_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_turntable_turntable_msg_proto_goTypes,
DependencyIndexes: file_turntable_turntable_msg_proto_depIdxs,
MessageInfos: file_turntable_turntable_msg_proto_msgTypes,
}.Build()
File_turntable_turntable_msg_proto = out.File
file_turntable_turntable_msg_proto_rawDesc = nil
file_turntable_turntable_msg_proto_goTypes = nil
file_turntable_turntable_msg_proto_depIdxs = nil
}

274
pb/venture_db.pb.go Normal file
View File

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

599
pb/venture_msg.pb.go Normal file
View File

@ -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 VentureLvRewardReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Cid int32 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid"` // 配置表id
}
func (x *VentureLvRewardReq) Reset() {
*x = VentureLvRewardReq{}
if protoimpl.UnsafeEnabled {
mi := &file_venture_venture_msg_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VentureLvRewardReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VentureLvRewardReq) ProtoMessage() {}
func (x *VentureLvRewardReq) 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 VentureLvRewardReq.ProtoReflect.Descriptor instead.
func (*VentureLvRewardReq) Descriptor() ([]byte, []int) {
return file_venture_venture_msg_proto_rawDescGZIP(), []int{6}
}
func (x *VentureLvRewardReq) GetCid() int32 {
if x != nil {
return x.Cid
}
return 0
}
type VentureLvRewardResp 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 *VentureLvRewardResp) Reset() {
*x = VentureLvRewardResp{}
if protoimpl.UnsafeEnabled {
mi := &file_venture_venture_msg_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VentureLvRewardResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VentureLvRewardResp) ProtoMessage() {}
func (x *VentureLvRewardResp) 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 VentureLvRewardResp.ProtoReflect.Descriptor instead.
func (*VentureLvRewardResp) Descriptor() ([]byte, []int) {
return file_venture_venture_msg_proto_rawDescGZIP(), []int{7}
}
func (x *VentureLvRewardResp) GetData() *DBVentureLv {
if x != nil {
return x.Data
}
return nil
}
func (x *VentureLvRewardResp) 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,
0x26, 0x0a, 0x12, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 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, 0x56, 0x0a, 0x13, 0x56, 0x65, 0x6e, 0x74, 0x75,
0x72, 0x65, 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
(*VentureLvRewardReq)(nil), // 6: VentureLvRewardReq
(*VentureLvRewardResp)(nil), // 7: VentureLvRewardResp
(*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: VentureLvRewardResp.data:type_name -> DBVentureLv
9, // 5: VentureLvRewardResp.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.(*VentureLvRewardReq); 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.(*VentureLvRewardResp); 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
}

View File

@ -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(),
)
}