Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into meixiongfeng

This commit is contained in:
meixiongfeng 2022-07-26 10:26:31 +08:00
commit 5608c5824b
43 changed files with 258 additions and 1531 deletions

View File

@ -29,7 +29,7 @@ const (
//模块名定义处 //模块名定义处
const ( const (
ModuleGate core.M_Modules = "gateway" //gate模块 网关服务模块 ModuleGate core.M_Modules = "gateway" //gate模块 网关服务模块
ModuleGM core.M_Modules = "gm" //gm模块 ModuleWeb core.M_Modules = "web" //后台模块
ModuleUser core.M_Modules = "user" //用户模块 ModuleUser core.M_Modules = "user" //用户模块
ModulePack core.M_Modules = "pack" //背包模块 ModulePack core.M_Modules = "pack" //背包模块
ModuleMail core.M_Modules = "mail" //邮件模块 ModuleMail core.M_Modules = "mail" //邮件模块
@ -44,6 +44,7 @@ const (
ModuleMainline core.M_Modules = "mainline" //主线模块 ModuleMainline core.M_Modules = "mainline" //主线模块
ModuleNotify core.M_Modules = "notify" //公告模块 ModuleNotify core.M_Modules = "notify" //公告模块
ModuleChat core.M_Modules = "chat" //装备模块 ModuleChat core.M_Modules = "chat" //装备模块
ModuleGM core.M_Modules = "gm" //gm模块
) )
//RPC服务接口定义处 //RPC服务接口定义处

View File

@ -1,54 +1,29 @@
package gm package gm
import ( import (
"go_dreamfactory/modules"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase"
"go_dreamfactory/lego/sys/gin"
"go_dreamfactory/lego/sys/gin/engine"
"reflect"
"strings"
) )
/* /*
web api 服务组件 装备模块 API
*/ */
type Api_Comp struct { type apiComp struct {
cbase.ModuleCompBase modules.MCompGate
options *Options //模块参数 service core.IService
module *GM //当前模块对象 module *GM
gin gin.ISys //gin 框架 web的热门框架
} }
//组件初始化接口 启动web服务 并注册api //组件初始化接口
func (this *Api_Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.ModuleCompBase.Init(service, module, comp, options) this.MCompGate.Init(service, module, comp, options)
this.options = options.(*Options)
this.module = module.(*GM) this.module = module.(*GM)
this.gin, err = gin.NewSys(gin.SetListenPort(this.options.Port)) this.service = service
this.suitableMethods() //发射注册api
return return
} }
func (this *Api_Comp) suitableMethods() { func (this *apiComp) Start() (err error) {
typ := reflect.TypeOf(this) err = this.MCompGate.Start()
vof := reflect.ValueOf(this) return
for m := 0; m < typ.NumMethod(); m++ {
method := typ.Method(m)
mname := method.Name
mtype := method.Type
if method.PkgPath != "" {
continue
}
if mtype.NumIn() != 2 {
continue
}
context := mtype.In(1)
if context.String() != "*engine.Context" {
continue
}
if mtype.NumOut() != 0 {
continue
}
this.gin.POST(strings.ToLower(mname), vof.MethodByName(mname).Interface().(func(*engine.Context)))
}
} }

View File

@ -1,16 +1,14 @@
package gm package gm
import ( import (
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase" "go_dreamfactory/modules"
) )
/* /*
模块名:gm 模块名:GM工具模块
描述:提供管理员相关的http接口 描述:处理客户端发过来的gm命令
开发:李伟 开发:李伟
*/ */
func NewModule() core.IModule { func NewModule() core.IModule {
@ -19,12 +17,8 @@ func NewModule() core.IModule {
} }
type GM struct { type GM struct {
cbase.ModuleBase modules.ModuleBase
options *Options api_comp *apiComp
api_comp *Api_Comp //提供weba pi服务的组件
modelUser *modelUserComp
modelNotify *modelNotifyComp
configure *configureComp
} }
//模块名 //模块名
@ -32,53 +26,14 @@ func (this *GM) GetType() core.M_Modules {
return comm.ModuleGM return comm.ModuleGM
} }
//模块自定义参数 //模块初始化接口 注册用户创建角色事件
func (this *GM) NewOptions() (options core.IModuleOptions) {
return new(Options)
}
func (this *GM) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { func (this *GM) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options) err = this.ModuleBase.Init(service, module, options)
this.options = options.(*Options)
return return
} }
//装备组件
func (this *GM) OnInstallComp() { func (this *GM) OnInstallComp() {
this.ModuleBase.OnInstallComp() this.ModuleBase.OnInstallComp()
this.api_comp = this.RegisterComp(new(Api_Comp)).(*Api_Comp) this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelUser = this.RegisterComp(new(modelUserComp)).(*modelUserComp)
this.modelNotify = this.RegisterComp(new(modelNotifyComp)).(*modelNotifyComp)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}
//日志
func (this *GM) Debugf(format string, a ...interface{}) {
if this.options.GetDebug() {
this.options.GetLog().Debugf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *GM) Infof(format string, a ...interface{}) {
if this.options.GetDebug() {
this.options.GetLog().Infof(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *GM) Warnf(format string, a ...interface{}) {
if this.options.Debug {
this.options.GetLog().Warnf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *GM) Errorf(format string, a ...interface{}) {
if this.options.GetLog() != nil {
this.options.GetLog().Errorf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *GM) Panicf(format string, a ...interface{}) {
if this.options.GetLog() != nil {
this.options.GetLog().Panicf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *GM) Fatalf(format string, a ...interface{}) {
if this.options.GetLog() != nil {
this.options.GetLog().Fatalf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
} }

83
modules/gm/module_test.go Normal file
View File

@ -0,0 +1,83 @@
package gm_test
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego"
"go_dreamfactory/lego/base/rpcx"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules/equipment"
"go_dreamfactory/modules/gm"
"go_dreamfactory/modules/hero"
"go_dreamfactory/modules/items"
"go_dreamfactory/modules/user"
"go_dreamfactory/services"
"go_dreamfactory/sys/cache"
"go_dreamfactory/sys/configure"
"go_dreamfactory/sys/db"
"os"
"testing"
"time"
)
func newService(ops ...rpcx.Option) core.IService {
s := new(TestService)
s.Configure(ops...)
return s
}
//梦工厂基础服务对象
type TestService struct {
rpcx.RPCXService
}
//初始化相关系统
func (this *TestService) InitSys() {
this.RPCXService.InitSys()
if err := cache.OnInit(this.GetSettings().Sys["cache"]); err != nil {
panic(fmt.Sprintf("init sys.cache err: %s", err.Error()))
} else {
log.Infof("init sys.cache success!")
}
if err := db.OnInit(this.GetSettings().Sys["db"]); err != nil {
panic(fmt.Sprintf("init sys.db err: %s", err.Error()))
} else {
log.Infof("init sys.db success!")
}
if err := configure.OnInit(this.GetSettings().Sys["configure"]); err != nil {
panic(fmt.Sprintf("init sys.configure err: %s", err.Error()))
} else {
log.Infof("init sys.configure success!")
}
}
var service core.IService
var s_gateComp comm.ISC_GateRouteComp = services.NewGateRouteComp()
var module = new(gm.GM)
//测试环境下初始化db和cache 系统
func TestMain(m *testing.M) {
service = newService(
rpcx.SetConfPath("../../bin/conf/worker_1.yaml"),
rpcx.SetVersion("1.0.0.0"),
)
service.OnInstallComp( //装备组件
s_gateComp, //此服务需要接受用户的消息 需要装备网关组件
)
go func() {
lego.Run(service, //运行模块
module,
hero.NewModule(),
user.NewModule(),
items.NewModule(),
equipment.NewModule(),
)
}()
time.Sleep(time.Second * 3)
defer os.Exit(m.Run())
}
func Test_Module(t *testing.T) {
}

54
modules/web/api.go Normal file
View File

@ -0,0 +1,54 @@
package web
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase"
"go_dreamfactory/lego/sys/gin"
"go_dreamfactory/lego/sys/gin/engine"
"reflect"
"strings"
)
/*
web api 服务组件
*/
type Api_Comp struct {
cbase.ModuleCompBase
options *Options //模块参数
module *Web //当前模块对象
gin gin.ISys //gin 框架 web的热门框架
}
//组件初始化接口 启动web服务 并注册api
func (this *Api_Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.ModuleCompBase.Init(service, module, comp, options)
this.options = options.(*Options)
this.module = module.(*Web)
this.gin, err = gin.NewSys(gin.SetListenPort(this.options.Port))
this.suitableMethods() //发射注册api
return
}
func (this *Api_Comp) suitableMethods() {
typ := reflect.TypeOf(this)
vof := reflect.ValueOf(this)
for m := 0; m < typ.NumMethod(); m++ {
method := typ.Method(m)
mname := method.Name
mtype := method.Type
if method.PkgPath != "" {
continue
}
if mtype.NumIn() != 2 {
continue
}
context := mtype.In(1)
if context.String() != "*engine.Context" {
continue
}
if mtype.NumOut() != 0 {
continue
}
this.gin.POST(strings.ToLower(mname), vof.MethodByName(mname).Interface().(func(*engine.Context)))
}
}

View File

@ -1,4 +1,4 @@
package gm package web
import ( import (
"go_dreamfactory/lego/sys/gin" "go_dreamfactory/lego/sys/gin"

View File

@ -1,4 +1,4 @@
package gm package web
import ( import (
"go_dreamfactory/lego/sys/gin/engine" "go_dreamfactory/lego/sys/gin/engine"

View File

@ -1,4 +1,4 @@
package gm package web
import ( import (
"fmt" "fmt"

View File

@ -1,4 +1,4 @@
package gm package web
import "go_dreamfactory/pb" import "go_dreamfactory/pb"

View File

@ -1,4 +1,4 @@
package gm package web
import ( import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
@ -12,12 +12,12 @@ import (
//公告数据模块 //公告数据模块
type modelNotifyComp struct { type modelNotifyComp struct {
modules.MCompModel modules.MCompModel
module *GM module *Web
} }
func (this *modelNotifyComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { func (this *modelNotifyComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
this.MCompModel.Init(service, module, comp, opt) this.MCompModel.Init(service, module, comp, opt)
this.module = module.(*GM) this.module = module.(*Web)
this.TableName = "notify" this.TableName = "notify"
return return
} }

View File

@ -1,4 +1,4 @@
package gm package web
import ( import (
"fmt" "fmt"
@ -14,12 +14,12 @@ import (
//用户数据模块 //用户数据模块
type modelUserComp struct { type modelUserComp struct {
modules.MCompModel modules.MCompModel
module *GM module *Web
} }
func (this *modelUserComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { func (this *modelUserComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
this.MCompModel.Init(service, module, comp, opt) this.MCompModel.Init(service, module, comp, opt)
this.module = module.(*GM) this.module = module.(*Web)
this.TableName = "user" this.TableName = "user"
return return
} }

84
modules/web/module.go Normal file
View File

@ -0,0 +1,84 @@
package web
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase"
)
/*
模块名:web
描述:提供管理员相关的http接口
开发:李伟
*/
func NewModule() core.IModule {
m := new(Web)
return m
}
type Web struct {
cbase.ModuleBase
options *Options
api_comp *Api_Comp //提供weba pi服务的组件
modelUser *modelUserComp
modelNotify *modelNotifyComp
configure *configureComp
}
//模块名
func (this *Web) GetType() core.M_Modules {
return comm.ModuleWeb
}
//模块自定义参数
func (this *Web) NewOptions() (options core.IModuleOptions) {
return new(Options)
}
func (this *Web) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
this.options = options.(*Options)
return
}
func (this *Web) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api_comp = this.RegisterComp(new(Api_Comp)).(*Api_Comp)
this.modelUser = this.RegisterComp(new(modelUserComp)).(*modelUserComp)
this.modelNotify = this.RegisterComp(new(modelNotifyComp)).(*modelNotifyComp)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}
//日志
func (this *Web) Debugf(format string, a ...interface{}) {
if this.options.GetDebug() {
this.options.GetLog().Debugf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *Web) Infof(format string, a ...interface{}) {
if this.options.GetDebug() {
this.options.GetLog().Infof(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *Web) Warnf(format string, a ...interface{}) {
if this.options.Debug {
this.options.GetLog().Warnf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *Web) Errorf(format string, a ...interface{}) {
if this.options.GetLog() != nil {
this.options.GetLog().Errorf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *Web) Panicf(format string, a ...interface{}) {
if this.options.GetLog() != nil {
this.options.GetLog().Panicf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}
func (this *Web) Fatalf(format string, a ...interface{}) {
if this.options.GetLog() != nil {
this.options.GetLog().Fatalf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
}
}

View File

@ -1,4 +1,4 @@
package gm package web
import ( import (
"go_dreamfactory/lego/utils/mapstructure" "go_dreamfactory/lego/utils/mapstructure"

View File

@ -1,25 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
enum ChatChannel {
World = 0; //
Union = 1; //
Private = 2; //
CrossServer = 3; //
System = 4; //
}
message DBChat {
string id =1; //id
ChatChannel channel = 2; //
string suid =3; //id
string ruid = 4; //id channel == Private
int32 groud = 5; // id
int32 areaId = 6; // Id
string unionId = 7; //id
int32 headid = 8; //
string uname = 9; //
string content = 10; //
int64 ctime = 11; //
}

View File

@ -1,70 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "chat/chat_db.proto";
//
message ChatMessagePush{
DBChat chat = 1;
}
//
message ChatCrossChannelReq {
}
//
message ChatCrossChannelResp {
int32 channelId = 1;
}
//
message ChatChanageChannelReq {
int32 channelId = 1;
}
//
message ChatChanageChannelResp {
int32 channelId = 1;
bool isSucc = 2;
}
//
message ChatGetListReq {
ChatChannel channel = 1; //
}
//
message ChatGetListResp {
repeated DBChat chats = 1;
}
//
message ChatSpanGetListReq {
ChatChannel channel = 1; //
int32 channelId = 2; //id
}
//
message ChatSpanGetListResp {
repeated DBChat chats = 1;
}
//
message ChatSendReq {
ChatChannel channel = 1; //
string targetId = 2; //id
string content = 3; //
}
//
message ChatSendResp {
}
//
message ChatSpanSendReq {
ChatChannel channel = 1; //
string content = 2; //
}
//
message ChatSpanSendResp {
}

View File

@ -1,96 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "errorcode.proto";
import "google/protobuf/any.proto";
//
message UserMessage {
string MainType = 1; // :user user的模块
string SubType = 2; // :login user的模块中
// api_login
google.protobuf.Any data = 3;
string sec = 4; //
}
//
message AgentMessage {
string Ip = 1;
string UserSessionId = 2;
string UserId = 3;
string ServiceTag = 4;
string GatewayServiceId = 5;
string MainType = 6;
string SubType = 7;
google.protobuf.Any Message = 8;
}
// RPC
message RPCMessageReply {
ErrorCode Code = 1;
string ErrorMessage = 2;
google.protobuf.Any ErrorData = 3;
repeated UserMessage Reply = 4;
}
//Uid请求
message AgentBuildReq {
string UserSessionId = 1;
string UserId = 2;
string WorkerId = 3;
}
//
message AgentUnBuildReq { string UserSessionId = 1; }
//
message AgentSendMessageReq {
string UserSessionId = 1;
repeated UserMessage Reply = 2;
}
//
message BatchMessageReq {
repeated string UserSessionIds = 1;
string MainType = 2;
string SubType = 3;
google.protobuf.Any Data = 4;
}
//广
message BroadCastMessageReq {
string MainType = 1; //
string SubType = 2;
google.protobuf.Any Data = 3;
}
//
message AgentCloseeReq { string UserSessionId = 1; }
//线
message NoticeUserCloseReq {
string Ip = 1;
string UserSessionId = 2;
string UserId = 3;
string ServiceTag = 4;
string GatewayServiceId = 5;
}
//
enum HeroAttributesType {
Hp = 0; //
Atk = 1; //
Def = 2; //
Speed = 3; //
Crit = 4; //
}
// *cfg.Game_atn
message UserAssets {
string A = 1;
string T = 2;
int32 N = 3;
}
message TaskParam {
int32 first = 1; //
int32 second = 2; //
}

View File

@ -1,25 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
//
message EquipmentAttributeEntry {
int32 Id = 1; //id
int32 libraryid = 2; //id
string AttrName = 3; //
int32 Lv = 4; //
int32 Value = 5; //
}
//
message DB_Equipment {
string Id = 1; //@go_tags(`bson:"_id"`) id
string cId = 2; //@go_tags(`bson:"cId"`) Id
string uId = 3; //@go_tags(`bson:"uid"`) Id
string heroId = 5; //@go_tags(`bson:"heroId"`) id ''
sint32 lv = 6; //@go_tags(`bson:"lv"`)
sint32 keepFailNum = 7; //@go_tags(`bson:"keepFailNum"`)
EquipmentAttributeEntry mainEntry = 8; //@go_tags(`bson:"mainEntry"`)
repeated EquipmentAttributeEntry adverbEntry = 9; //@go_tags(`bson:"adverbEntry"`)
uint32 overlayNum = 10; //@go_tags(`bson:"overlayNum"`)
bool isInitialState = 11; //@go_tags(`bson:"isInitialState"`)
}

View File

@ -1,39 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "equipment/equipment_db.proto";
//
message EquipmentGetListReq {
}
//
message EquipmentGetListResp {
repeated DB_Equipment Equipments = 1; //
}
//
message EquipmentChangePush {
repeated DB_Equipment Equipments = 1; //
}
//
message EquipmentEquipReq{
string HeroCardId = 1; //Id
repeated string EquipmentId = 2; //Id 0-5
}
//
message EquipmentEquipResp{
repeated DB_Equipment Equipments = 1; //
}
//
message EquipmentUpgradeReq{
string EquipmentId = 1; //Id
}
//
message EquipmentUpgradeResp{
bool IsSucc = 1;
repeated DB_Equipment Equipment = 2; //
}

View File

@ -1,109 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
enum ErrorCode {
Success = 0; //
NoFindService = 10; //
NoFindServiceHandleFunc = 11; //
RpcFuncExecutionError = 12; // Rpc方法执行错误
CacheReadError = 13; //
SqlExecutionError = 14; //
ReqParameterError = 15; //
SignError = 16; //
InsufficientPermissions = 17; //
NoLogin = 18; //
UserSessionNobeing = 19; //
StateInvalid = 20; //
DBError = 21; //
SystemError = 22; //
Exception = 100; //
Unknown = 101; //
ResNoEnough = 102; //
ConfigurationException = 103; //
ConfigNoFound = 104; //
// user
SecKeyInvalid = 1000; //
SecKey = 1001; //
BindUser = 1002; //
GoldNoEnough = 1003; //
DiamondNoEnough = 1004; //
RoleCreated = 1005; //
NameExist = 1006; //
VeriCodeNoValid = 1007; //
VeriCodeExpired = 1008; //
UserResetData = 1009; //
ModifynameCount = 1010; //
MailErr = 1011; //
// friend
FriendNotSelf = 1100; //
FriendSelfMax = 1101; //
FriendTargetMax = 1102; //
FriendSelfNoData = 1103; //
FriendTargetNoData = 1104; //
FriendYet = 1105; //
FriendApplyYet = 1106; //
FriendSelfBlackYet = 1107; //
FriendTargetBlackYet = 1108; //
FriendApplyError = 1109; //
FriendBlackMax = 1110; //
FriendSearchNameEmpty = 1111; //
// item
ItemsNoEnough = 1200; //
ItemsNoFoundGird = 1201; //
ItemsGridNumUpper = 1202; //
ItemsGirdAmountUpper = 1203; //
ItemsUseNotSupported = 1204; //使
// hero
HeroNoExist = 1300; //
HeroNoEnough = 1301; //
HeroMaxLv = 1302; //
HeroInitCreat = 1303; //
HeroColorErr = 1304; //
HeroSkillUpErr = 1305; //
HeroMaxResonate = 1306; //
HeroNoResonate = 1307; //
HeroNotNeedResonate = 1308; //
HeroNoEnergy = 1309; //
HeroCreate = 1310; //
HeroEquipUpdate = 1311; //
HeroMaxAwaken = 1312; //
HeroIsLock = 1313; //
HeroMaxCount = 1314; //
HeroCostTypeErr = 1315; //
HeroStarErr = 1316; //
HeroTypeErr = 1317; //
HeroExpTypeErr = 1318; //
HeroAddMaxExp = 1319; //
HeroStarLvErr = 1320; //
HeroMaxStarLv = 1321; //
DrawCardTypeNotFound = 1322; //
// equipment
EquipmentOnFoundEquipment = 1400; //
EquipmentLvlimitReached = 1401; //
// mainMainline
MainlineNotFindChapter = 1500; // 线
MainlineIDFailed = 1501; // ID
MainlineNotFound = 1502; // 线
MainlinePreNotFound = 1503; //
MainlineRepeatReward = 1504; //
MainlineCompleteReward = 1505; //
// task
TaskInit = 1600; //
TaskReset = 1601; //
TaskHandle = 1602; //
TaskReceived = 1603; //
TaskActiveInit = 1604; //
TaskActiveNofound = 1605; //
TaskActiveNoenough = 1606; //
TaskNoFinished = 1607; //
TaskFinished = 1608; //
// shop
ShopGoodsIsSoldOut = 1700; //
}

View File

@ -1,3 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";

View File

@ -1,2 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";

View File

@ -1,9 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
message DBFriend {
string uid = 1; //@go_tags(`bson:"uid"`) ID
repeated string friendIds = 2; //@go_tags(`bson:"friendIds"`) ID
repeated string applyIds = 3; //@go_tags(`bson:"applyIds"`) ID
repeated string blackIds = 4; //@go_tags(`bson:"blackIds"`) ID
}

View File

@ -1,108 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
message FriendBase {
string userId = 1; // ID
string NickName = 2; //
int32 level = 3; //
int32 avatar = 4; //
int64 strength = 5; //
int32 serverId = 6; //
int64 offlineTime = 7; //线 0线
}
//
message FriendListReq {}
message FriendListResp { repeated FriendBase list = 1; }
//
message FriendApplyReq {
string friendId = 1; //ID
}
message FriendApplyResp {
string userId = 1; //ID
string friendId = 2; //ID
}
//
message FriendDelReq {
string friendId = 1; //ID
}
message FriendDelResp {
string friendId = 1; //ID
string userId = 2; //ID
}
//
message FriendAgreeReq {
repeated string friendIds = 1; //
}
message FriendAgreeResp {
int32 Num = 1; //
}
//
message FriendRefuseReq {
repeated string friendIds = 1; //
}
message FriendRefuseResp {
int32 Num = 1; //
}
//
message FriendApplyListReq {}
message FriendApplyListResp { repeated FriendBase list = 1; }
//
message FriendSearchReq {
string nickName = 1; //
}
message FriendSearchResp { FriendBase friend = 1; }
//
message FriendBlackListReq {}
message FriendBlackListResp { repeated FriendBase friends = 1; }
//
message FriendBlackAddReq { string friendId = 1; }
message FriendBlackAddResp {
string friendId = 1;
string userId = 2;
}
//
message FriendDelBlackReq { string friendId = 1; }
message FriendDelBlackResp {
string friendId = 1;
string userId = 2;
}
//
message FriendReceiveReq { string friendId = 1; }
message FriendReceiveResp {
string friendId = 1;
string userId = 2;
}
//
message FriendGiveReq { string friendId = 1; }
message FriendGiveResp {
string friendId = 1;
string userId = 2;
}
//
message FriendTotalReq { string friendId = 1; }
message FriendTotalResp {
string friendId = 1;
int32 total = 2; //
}

View File

@ -1,158 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package google.protobuf;
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option go_package = "google.golang.org/protobuf/types/known/anypb";
option java_package = "com.google.protobuf";
option java_outer_classname = "AnyProto";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
// `Any` contains an arbitrary serialized protocol buffer message along with a
// URL that describes the type of the serialized message.
//
// Protobuf library provides support to pack/unpack Any values in the form
// of utility functions or additional generated methods of the Any type.
//
// Example 1: Pack and unpack a message in C++.
//
// Foo foo = ...;
// Any any;
// any.PackFrom(foo);
// ...
// if (any.UnpackTo(&foo)) {
// ...
// }
//
// Example 2: Pack and unpack a message in Java.
//
// Foo foo = ...;
// Any any = Any.pack(foo);
// ...
// if (any.is(Foo.class)) {
// foo = any.unpack(Foo.class);
// }
//
// Example 3: Pack and unpack a message in Python.
//
// foo = Foo(...)
// any = Any()
// any.Pack(foo)
// ...
// if any.Is(Foo.DESCRIPTOR):
// any.Unpack(foo)
// ...
//
// Example 4: Pack and unpack a message in Go
//
// foo := &pb.Foo{...}
// any, err := anypb.New(foo)
// if err != nil {
// ...
// }
// ...
// foo := &pb.Foo{}
// if err := any.UnmarshalTo(foo); err != nil {
// ...
// }
//
// The pack methods provided by protobuf library will by default use
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
// methods only use the fully qualified type name after the last '/'
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
// name "y.z".
//
//
// JSON
//
// The JSON representation of an `Any` value uses the regular
// representation of the deserialized, embedded message, with an
// additional field `@type` which contains the type URL. Example:
//
// package google.profile;
// message Person {
// string first_name = 1;
// string last_name = 2;
// }
//
// {
// "@type": "type.googleapis.com/google.profile.Person",
// "firstName": <string>,
// "lastName": <string>
// }
//
// If the embedded message type is well-known and has a custom JSON
// representation, that representation will be embedded adding a field
// `value` which holds the custom JSON in addition to the `@type`
// field. Example (for message [google.protobuf.Duration][]):
//
// {
// "@type": "type.googleapis.com/google.protobuf.Duration",
// "value": "1.212s"
// }
//
message Any {
// A URL/resource name that uniquely identifies the type of the serialized
// protocol buffer message. This string must contain at least
// one "/" character. The last segment of the URL's path must represent
// the fully qualified name of the type (as in
// `path/google.protobuf.Duration`). The name should be in a canonical form
// (e.g., leading "." is not accepted).
//
// In practice, teams usually precompile into the binary all types that they
// expect it to use in the context of Any. However, for URLs which use the
// scheme `http`, `https`, or no scheme, one can optionally set up a type
// server that maps type URLs to message definitions as follows:
//
// * If no scheme is provided, `https` is assumed.
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
// value in binary format, or produce an error.
// * Applications are allowed to cache lookup results based on the
// URL, or have them precompiled into a binary to avoid any
// lookup. Therefore, binary compatibility needs to be preserved
// on changes to types. (Use versioned type names to manage
// breaking changes.)
//
// Note: this functionality is not currently available in the official
// protobuf release, and it is not used for type URLs beginning with
// type.googleapis.com.
//
// Schemes other than `http`, `https` (or the empty scheme) might be
// used with implementation specific semantics.
//
string type_url = 1;
// Must be a valid serialized protocol buffer of the above specified type.
bytes value = 2;
}

View File

@ -1,33 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
message SkillData {
int32 skillID = 1;
int32 skillLv = 2;
}
message DBHero {
string id = 1; //@go_tags(`bson:"_id"`) ID
string uid = 2;
string heroID = 3; //@go_tags(`bson:"heroID"`) ID
int32 star = 4; //
int32 lv = 5; //
int32 exp = 6; //
int32 juexingLv = 7; //@go_tags(`bson:"juexingLv"`)
int32 captainSkill = 8; //@go_tags(`bson:"captainSkill"`)
repeated SkillData normalSkill = 9; //@go_tags(`bson:"normalSkill"`)
map<string, int32> property = 10; //
map<string, int32> addProperty = 11; //@go_tags(`bson:"addProperty"`)
int32 cardType = 12; //@go_tags(`bson:"cardType"`) ()
int32 curSkin = 13; //@go_tags(`bson:"curSkin"`) ID
repeated int32 skins = 14; // ID
bool block = 15; //
repeated string equipID = 16; //@go_tags(`bson:"equipID"`) objID
int32 resonateNum = 17; //@go_tags(`bson:"resonateNum"`)
int32 distributionResonate = 18; //@go_tags(`bson:"distributionResonate"`)
map<int32, int32> energy = 19; // @go_tags(`bson:"energy"`)[1,0]
int32 sameCount = 20; // @go_tags(`bson:"sameCount"`)
int32 suiteId = 21; //@go_tags(`bson:"suiteId"`) Id
int32 suiteExtId = 22; // go_tags(`bson:"suiteExtId"`) Id
bool isOverlying = 23; // go_tags(`bson:"isOverlying"`) true
}

View File

@ -1,155 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "hero/hero_db.proto";
//
message HeroInfoReq {
string heroId = 1; //ID
}
message HeroInfoResp { DBHero base = 1; }
//
message HeroListReq {}
message HeroListResp { repeated DBHero list = 1; }
/// : ()
/// : (使)
/// : ()
message ItemData {
int32 itemId = 2; //Id
int32 amount = 3; //
}
message MapStringInt32 {
string Key = 1;
int32 Value = 2;
}
//
message HeroStrengthenUplvReq {
string heroObjID = 1; // ID
repeated MapStringInt32 expCards = 2;
}
//
message HeroStrengthenUplvResp {
DBHero hero = 1; //
}
message CostCardData {
string costCardObj = 1; // ID
int32 amount = 2; //
}
//
message HeroStrengthenUpStarReq {
string heroObjID = 1; // ID
repeated CostCardData hero = 2; // ID
repeated CostCardData heroRace = 3; // ID
}
//
message HeroStrengthenUpStarResp {
DBHero hero = 1; //
}
//
message HeroStrengthenUpSkillReq {
string heroObjID = 1; // ID
string costCardObj = 2; //
}
//
message HeroStrengthenUpSkillResp {
DBHero hero = 1; //
}
//
message HeroResonanceReq {
string heroObjID = 1; // ID
repeated string costObjID = 2; //
}
message HeroResonanceResp {
DBHero hero = 1; //
int32 energy = 2; //
DBHero upStarCard = 3; //
}
//
message HeroResonanceResetReq {
string heroObjID = 1; // ID
}
message HeroResonanceResetResp {
DBHero hero = 1; //
int32 energy = 2; //
}
// 使
message HeroResonanceUseEnergyReq {
string heroObjID = 1; // ID
int32 useEnergy = 2; // 使
int32 useType = 3; // 使
}
message HeroResonanceUseEnergyResp {
DBHero hero = 1; //
}
//
message HeroAwakenReq {
string heroObjID = 1; // ID
}
//
message HeroAwakenResp {
DBHero hero = 1; //
}
//
message HeroChoukaReq { repeated string heroIds = 1; }
message HeroChoukaResp { repeated DBHero heroes = 1; }
//
message HeroPropertyPush {
string heroId = 1; //ID
map<string, int32> property = 2; //
map<string, int32> addProperty = 3; //
}
//
message HeroLockReq { string heroid = 1; }
//
message HeroLockResp {
DBHero hero = 1; //
}
//
message HeroGetSpecifiedReq {
string heroCoinfigID = 1; // ID
int32 Amount = 2; //
int32 star = 3; //
int32 lv = 4; //
}
message HeroGetSpecifiedResp {
DBHero hero = 1; //
}
//
message HeroDrawCardReq {
int32 drawType = 1; // drawCardCost表
}
message HeroDrawCardResp {
repeated string heroes = 1; // configID
}
//
message HeroChangePush{
repeated DBHero list = 1;
}

View File

@ -1,15 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
//
message DB_UserItemData {
string gridId = 1; //@go_tags(`bson:"_id"`) Id
string uId = 2; //@go_tags(`bson:"uid"`) id
string itemId = 3; //@go_tags(`bson:"itemId"`) Id
uint32 amount = 4; //@go_tags(`bson:"amount"`)
int64 cTime = 5; //@go_tags(`bson:"cTime"`)
int64 eTime = 6; //@go_tags(`bson:"eTime"`)
bool isNewItem = 7; //@go_tags(`bson:"isNewItem"`)
int64 lastopt = 8; //@go_tags(`bson:"lastopt"`)
}

View File

@ -1,45 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "items/items_db.proto";
//
message ItemsGetlistReq {
int32 IType = 1; //
}
//
message ItemsGetlistResp {
repeated DB_UserItemData Grids = 1; //
}
//
message ItemsChangePush {
repeated DB_UserItemData Grids = 1; //
}
//使
message ItemsUseItemReq {
string GridId = 1; //Id
uint32 Amount = 2; //使
}
//使
message ItemsUseItemResp {
string GridId = 1; //Id
uint32 Amount = 2; //使
bool issucc = 3; //
}
//sailitem
message ItemsSellItemReq {
string GridId = 1; //Id
string ItemId = 2; //Id
uint32 Amount = 3; //使
}
//
message ItemsSellItemResp {
string GridId = 1; //Id
uint32 Amount = 2; //使
bool issucc = 3; //
}

View File

@ -1,15 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "comm.proto";
message DBMailData {
string ObjId = 1; // @go_tags(`bson:"_id"`) ID
string Uid = 2;
string Title = 3; //
string Contex = 4; //
uint64 CreateTime = 5; //
uint64 DueTime = 6; //
bool Check = 7; //
bool Reward = 8; //
repeated UserAssets Items = 9; //
}

View File

@ -1,44 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "mail/mail_db.proto";
message MailGetListReq {
}
//
message MailGetListResp {
repeated DBMailData Mails = 1;
}
//
message MailReadMailReq {
string ObjID = 1;
}
message MailReadMailResp {
DBMailData Mail = 1;
}
//
message MailGetUserMailAttachmentReq {
string ObjID = 1;
}
message MailGetUserMailAttachmentResp {
DBMailData Mail = 1;
}
//
message MailDelMailReq {
string ObjID = 1;
}
message MailDelMailResp {
string ObjID = 1; // id
}
//
message MailGetNewMailPush{
DBMailData Mail = 1; //
}

View File

@ -1,11 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
message DBMainline {
string id = 1; //@go_tags(`bson:"_id"`) ID
string uid = 2; //@go_tags(`bson:"uid"`) ID
int32 chapterId = 3; //@go_tags(`bson:"chapterId"`) ID
int32 mainlineId = 4; //@go_tags(`bson:"mainlineId"`) 线ID
int32 awaredID = 5; //@go_tags(`bson:"awaredID"`) (int是考虑后续扩展有多个宝箱情况)
repeated int32 branchID = 6; // @go_tags(`bson:"branchID"`)
}

View File

@ -1,36 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "mainline/mainline_db.proto";
//
message MainlineGetListReq {
}
//
message MainlineGetListResp {
repeated DBMainline data = 1;
}
//
message MainlineGetRewardReq {
string chapterObj = 1; // id
}
message MainlineGetRewardResp {
DBMainline data = 1; //
}
//
message MainlineChallengeReq {
string chapterObj = 1; // id
uint32 mainlineId = 2; // ID
}
message MainlineChallengeResp {
DBMainline data = 1; //
}
//
message MainlineNewChapterPush{
DBMainline data = 1;
}

View File

@ -1,12 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
//
message DBSystemNotify {
string id = 1; //Id
string title = 2; //
string content = 3; //
bool istop = 4; //
int64 ctime = 5; //
int64 rtime = 6; //
}

View File

@ -1,25 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "errorcode.proto";
import "notify/notify_db.proto";
import "google/protobuf/any.proto";
//
message NotifyErrorNotifyPush {
string ReqMainType = 1; // :user user的模块
string ReqSubType = 2; // :login user的模块中
// api_login
ErrorCode Code = 3; // errorcode.proto
string Message = 4; //
google.protobuf.Any arg = 5; //
google.protobuf.Any Data = 6; //
}
//
message NotifyGetListReq {}
//
message NotifyGetListResp {
int64 LastReadTime = 1; //
repeated DBSystemNotify SysNotify = 2; //
}

View File

@ -1,35 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
enum ShopType {
Null = 0;
GoldShop = 1;
DiamondShop = 2;
PVPShop = 3;
PVEShop = 4;
AllianceShop = 5;
}
message UserShopData {
int64 LastRefreshTime = 1; //
int32 ManualRefreshNum = 2; //
repeated int32 Items = 3; //
}
message DBShop {
string id = 1; //@go_tags(`bson:"_id"`) id
string uid = 2; //@go_tags(`bson:"uid"`) id
UserShopData goldShop = 3; //@go_tags(`bson:"goldShop"`)
UserShopData diamondShop = 4; //@go_tags(`bson:"diamondShop"`)
UserShopData pvpShop = 5; //@go_tags(`bson:"pvpShop"`)
UserShopData pveShop = 6; //@go_tags(`bson:"pveShop"`)
UserShopData allianceShop = 7; //@go_tags(`bson:"allianceShop"`)
}
message DBShopItem {
string id = 1; //@go_tags(`bson:"_id"`) id
string uid = 2; //@go_tags(`bson:"uid"`) id
int32 goodsId = 3; //@go_tags(`bson:"goodsId"`)Id
map<int32,int32> buyNum = 4; //@go_tags(`bson:"buyNum"`)
map<int32,int64> lastBuyTime = 5; //@go_tags(`bson:"lastBuyTime"`)
}

View File

@ -1,36 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "shop/shop_db.proto";
import "comm.proto";
//
message ShopItem {
int32 GoodsId = 1; //Id
repeated UserAssets Items = 2; //
repeated UserAssets Consume = 3; //
int32 Sale = 4; //
int32 LeftBuyNum = 5; //
}
//
message ShopGetListReq {
ShopType sType = 1; //
bool IsManualRefresh = 2; //
}
//
message ShopGetListResp {
repeated ShopItem Goods = 1; //
}
//
message ShopBuyReq {
ShopType ShopType = 1; //
int32 GoodsId = 2; //Id
}
//
message ShopBuyResp {
bool IsSucc = 1; //
}

View File

@ -1,23 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
message DBTask {
string id = 1; //@go_tags(`bson:"_id"`) ID
string uid = 2; //@go_tags(`bson:"uid"`) ID
int32 taskId = 3; //@go_tags(`bson:"taskId"`) Id
int32 tag = 4; //@go_tags(`bson:"tag"`)
int32 progress = 5; //@go_tags(`bson:"progress"`) /
int32 active = 6; //@go_tags(`bson:"active"`)
int32 status = 7; //@go_tags(`bson:"status"`) 0 1
int32 received = 8; //@go_tags(`bson:"received"`) 0 1
int32 typeId = 9; //@go_tags(`bson:"typeId"`)
int32 sort = 10; //@go_tags(`bson:"sort"`)
}
message DBTaskActive {
string id = 1; //@go_tags(`bson:"_id"`) ID
string uid = 2; //@go_tags(`bson:"uid"`) ID
int32 rId = 3; //@go_tags(`bson:"taskId"`) rewardId
int32 tag = 4; //@go_tags(`bson:"tag"`)
int32 received = 5; //@go_tags(`bson:"received"`) 0 1
}

View File

@ -1,51 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "task/task_db.proto";
//
message TaskReceiveReq {
int32 taskTag = 1; // 1/2/3
string id = 2; //ID
}
message TaskReceiveResp {
int32 taskId = 1; //ID
}
//
message TaskListReq {
int32 taskTag = 1; ////
}
message TaskListResp { repeated DBTask list = 1; }
//
message TaskActiveListReq { int32 taskTag = 1; }
message TaskActiveListResp {
repeated DBTaskActive list = 1; //
int32 active = 2; //
}
//
message TaskActiveReceiveReq {
int32 taskTag = 1; // 1/2
string id = 2; //id
}
message TaskActiveReceiveResp {
int32 taskTag = 1;
string id = 2;
}
//
message TaskDoStrategyReq {
int32 heroCfgId = 1; //ID
}
message TaskDoStrategyResp {
repeated int32 taskIds = 1; //ID
}
//
message TaskFinishedPush {
int32 taskId = 1;
}

View File

@ -1,49 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
message CacheUser {
string uid = 1; //@go_tags(`json:"uid"`) id
string SessionId = 2; //@go_tags(`json:"sessionId"`) id
string ServiceTag = 3; //@go_tags(`json:"serviceTag"`) id
string GatewayServiceId = 4; //@go_tags(`json:"gatewayServiceId"`) id
string ip = 5; //@go_tags(`json:"ip"`) ip
}
message DBUser {
string id = 1; //@go_tags(`bson:"_id"`) ID
string uid = 2; //@go_tags(`bson:"uid"`) ID
string uuid = 3; //@go_tags(`bson:"uuid"`) uuid
string binduid = 4; //@go_tags(`bson:"binduid"`)
string name = 5; //@go_tags(`bson:"name"`)
int32 sid = 6; //@go_tags(`bson:"sid"`) id
string createip = 7; //@go_tags(`bson:"createip"`) ip
string lastloginip = 8; //@go_tags(`bson:"lastloginip"`) ip
int64 ctime = 9; //@go_tags(`bson:"ctime"`)
int64 logintime = 10; //@go_tags(`bson:"logintime"`)
int32 friendPoint = 11; //@go_tags(`bson:"friendPoint"`)
int32 avatar = 12; //@go_tags(`bson:"avatar"`)
int32 gold = 13; //@go_tags(`bson:"gold"`)
int32 exp = 14; //@go_tags(`bson:"exp"`)
bool created = 15; //@go_tags(`bson:"created"`)
int32 lv = 16; //@go_tags(`bson:"lv"`)
int32 vip = 17; //@go_tags(`bson:"vip"`) vip
int32 diamond = 18; //@go_tags(`bson:"diamond"`)
int32 title = 19; //@go_tags(`bson:"title"`)
}
message DBUserSetting {
string uid = 2; //@go_tags(`bson:"uid"`) ID
uint32 huazhi = 3; //@go_tags(`bson:"huazhi"`) 0 1 2 3
uint32 kangjuchi = 4; //@go_tags(`bson:"kangjuchi"`) 齿 0 1 2 3
bool gaoguang = 5; //@go_tags(`bson:"gaoguang"`)
bool wuli = 6; //@go_tags(`bson:"wuli"`)
bool music = 7; //@go_tags(`bson:"music"`)
bool effect = 8; //@go_tags(`bson:"effect"`)
bool guaji = 9; //@go_tags(`bson:"guaji"`)
bool fuben = 10; //@go_tags(`bson:"fuben"`)
bool tansuo = 11; //@go_tags(`bson:"tansuo"`)
bool huodong = 12; //@go_tags(`bson:"huodong"`)
bool xuanshang = 13; //@go_tags(`bson:"wanfa"`)
bool saiji = 14; //@go_tags(`bson:"wanfa"`)
}

View File

@ -1,122 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "errorcode.proto";
import "user/user_db.proto";
import "comm.proto";
import "userexpand.proto";
//
message UserLoginReq {
string account = 1; //
int32 sid = 2; //
}
message UserLoginResp {
DBUser data = 1;
DBUserExpand ex = 2; //
}
//
message UserLogoutReq {}
message UserLogoutResp {}
//
message UserRegisterReq {
string account = 1;
int32 sid = 2;
}
message UserRegisterResp {
ErrorCode Code = 1;
string account = 2;
}
message UserLoadResp { CacheUser data = 1; }
//
message UserCreateReq {
string NickName = 1; //
}
message UserCreateResp {
bool IsSucc = 1;
}
//
message UserAddResReq {
UserAssets res = 1; //
}
message UserAddResResp {
UserAssets res = 1; //
}
//
message UserResChangePush {
int32 gold = 1; //@go_tags(`bson:"gold"`)
int32 exp = 2; //@go_tags(`bson:"exp"`)
int32 lv = 3; //@go_tags(`bson:"lv"`)
int32 vip = 4; //@go_tags(`bson:"vip"`) vip
int32 diamond = 5; //@go_tags(`bson:"diamond"`)
}
//
message UserGetSettingReq {}
message UserGetSettingResp {
DBUserSetting setting = 1; //
}
//
message UserUpdateSettingReq { DBUserSetting setting = 1; }
message UserUpdateSettingResp { string uid = 1; }
//
message UserVeriCodeReq {}
message UserVeriCodeResp {
int32 code = 1; //
}
//
message UserInitdataReq {
int32 code = 1; //
}
message UserInitdataResp { string uid = 1; }
//
message UserModifynameReq {
string name = 1; //
}
message UserModifynameResp {
string uid = 1;
uint32 count = 2; //
}
//
message UserGetTujianReq {}
message UserGetTujianResp { repeated string heroids = 1; }
//
message UserChangedPush {
string uid = 1;
int32 exp = 2;
int32 lv = 3;
}
//
message UserFigureReq {
int32 preinstall = 1; // 1-5
int32 action = 2; // 1-5 0
Hair hair = 3; // 1
Eyes eyes = 4; // 2
Mouth mouth = 5; // 3
Body body = 6; // 4
Complexion complexion = 7; // 5
}
message UserFigureResp {
string uid = 1;
int32 action = 2; //
Figure figure = 3;
}

View File

@ -1,53 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
//
message Hair {
int32 resId = 1; //ID
string color = 2; //
}
//
message Eyes {
int32 resId = 1; //ID
string color = 2; //
}
//
message Mouth {
string resId = 1; //ID
}
//
message Body {
int32 high = 1; //
int32 shape = 2; //
}
//
message Complexion {
string color = 1; //
}
//
message Figure {
Hair hair = 1;
Eyes eyes = 2;
Mouth mouth = 3;
Body body = 4;
Complexion complexion = 5;
}
//
message DBUserExpand {
string id = 1; //id
string uid = 2; //id
int64 lastreadnotiftime = 3; //
int64 lastInitdataTime = 4; //
uint32 initdataCount = 5; //
int32 chatchannel = 6; //
int32 modifynameCount = 7; //
map<string, bool> tujian = 8; //
int32 curFigure = 9; //
map<int32, Figure> preinstall = 10; //
}

View File

@ -1,21 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
message Floor{ //
int32 h4 = 1; // 4
int32 h5 = 2; // 5
}
//
message DBUserRecord {
string id = 1; //@go_tags(`bson:"_id"`) ID id
string uid = 2; //@go_tags(`bson:"uid"`) ID
Floor race0 = 3; //
Floor race1 = 4; // 1
Floor race2 = 5; // 2
Floor race3 = 6; // 3
Floor race4 = 7; // 4
int32 triggernum = 8; //
int32 activityid = 9; // id
int64 mtime = 10; //
}

View File

@ -3,8 +3,8 @@ package main
import ( import (
"flag" "flag"
"fmt" "fmt"
"go_dreamfactory/modules/gm"
"go_dreamfactory/modules/mgolog" "go_dreamfactory/modules/mgolog"
"go_dreamfactory/modules/web"
"go_dreamfactory/services" "go_dreamfactory/services"
"go_dreamfactory/sys/cache" "go_dreamfactory/sys/cache"
"go_dreamfactory/sys/db" "go_dreamfactory/sys/db"
@ -35,7 +35,7 @@ func main() {
) )
lego.Run(s, //运行模块 lego.Run(s, //运行模块
mgolog.NewModule(), mgolog.NewModule(),
gm.NewModule(), web.NewModule(),
) )
} }