From 5d93eca50ac0f22903b8ff29bba1c9169f17806b Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 11 May 2023 17:42:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96web=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lego/sys/gin/engine/context.go | 9 +++++---- lego/sys/gin/engine/engine.go | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lego/sys/gin/engine/context.go b/lego/sys/gin/engine/context.go index bfc21f4be..2c8132fab 100644 --- a/lego/sys/gin/engine/context.go +++ b/lego/sys/gin/engine/context.go @@ -33,6 +33,7 @@ const abortIndex int8 = math.MaxInt8 >> 1 func newContext(log log.ILogger, engine *Engine, params *Params, skippedNodes *[]skippedNode) *Context { return &Context{ + Log: log, engine: engine, params: params, skippedNodes: skippedNodes, @@ -102,8 +103,8 @@ func (this *Context) Handler() HandlerFunc { FullPath 返回匹配的路由完整路径。 对于未找到的路线 返回一个空字符串。 */ -func (c *Context) FullPath() string { - return c.fullPath +func (this *Context) FullPath() string { + return this.fullPath } func (this *Context) Next() { @@ -216,8 +217,8 @@ func (this *Context) GetUint(key string) (ui uint) { return } -func (c *Context) GetUInt32(key string) (i uint32) { - if val, ok := c.Get(key); ok && val != nil { +func (this *Context) GetUInt32(key string) (i uint32) { + if val, ok := this.Get(key); ok && val != nil { i, _ = val.(uint32) } return diff --git a/lego/sys/gin/engine/engine.go b/lego/sys/gin/engine/engine.go index 91a106d3e..ff5135bcc 100644 --- a/lego/sys/gin/engine/engine.go +++ b/lego/sys/gin/engine/engine.go @@ -491,7 +491,7 @@ func (this *Engine) prepareTrustedCIDRs() ([]*net.IPNet, error) { func (this *Engine) allocateContext() *Context { v := make(Params, 0, this.maxParams) skippedNodes := make([]skippedNode, 0, this.maxSections) - return &Context{Log: this.log, engine: this, params: &v, skippedNodes: &skippedNodes} + return newContext(this.log, this, &v, &skippedNodes) //& Context{Log: this.log, engine: this, params: &v, skippedNodes: &skippedNodes} } //日志接口------------------------------------------------------------- From cfb15800545230d1bc8e1fb5d76ca6d8d7aa8c8f Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 11 May 2023 17:49:22 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gateway/agent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index d9e8ba4c6..22cb614ab 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -176,12 +176,12 @@ func (this *Agent) decodeUserData(msg *pb.UserMessage) (code pb.ErrorCode, err e this.gateway.Errorf("base64 decode err %v", err) return pb.ErrorCode_DecodeError, nil } - now := time.Now().Unix() + now := configure.Now().Unix() jsonRet := gjson.Parse(string(dec)) timestamp := jsonRet.Get("timestamp").Int() //秘钥30秒失效 if now-time.Unix(timestamp, 0).Unix() > 30 { - this.gateway.Errorf("last timestamp:%v more than 30s", timestamp) + this.gateway.Errorf("now:%v last timestamp:%v more than 30s", now, timestamp) return pb.ErrorCode_TimestampTimeout, fmt.Errorf("sec key expire") } From ac232ccfcdc710c2ae7b7e0ea3418b162cace124 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 11 May 2023 19:04:51 +0800 Subject: [PATCH 3/3] update --- cmd/v2/lib/pb/protocol.go | 20 ++++- cmd/v2/lib/pb/task_protocol.go | 10 +++ cmd/v2/model/testcase.go | 3 +- cmd/v2/ui/app_testcase.go | 1 + cmd/v2/ui/navview.go | 4 +- cmd/v2/ui/tool_pb.go | 3 +- cmd/v2/ui/views/checkworldtask.go | 67 ++++++++++++++++ cmd/v2/ui/views/globalview.go | 59 ++++++++++++++ modules/hero/module.go | 22 +++--- modules/rtask/module.go | 112 +++++++++++++++------------ modules/sociaty/api_cross_dismiss.go | 2 +- modules/sociaty/api_cross_search.go | 2 +- 12 files changed, 237 insertions(+), 68 deletions(-) create mode 100644 cmd/v2/ui/views/checkworldtask.go create mode 100644 cmd/v2/ui/views/globalview.go diff --git a/cmd/v2/lib/pb/protocol.go b/cmd/v2/lib/pb/protocol.go index 86ff153ea..0b79c6d18 100644 --- a/cmd/v2/lib/pb/protocol.go +++ b/cmd/v2/lib/pb/protocol.go @@ -54,7 +54,10 @@ var ( string(comm.ModuleReputation), string(comm.ModuleOldtimes), }, - "gm": {common.MF(comm.ModuleGM, "cmd")}, + "gm": { + common.MF(comm.ModuleGM, "cmd"), + common.MF(comm.ModuleGM, "gi"), + }, "sys": { common.MF(comm.ModuleSys, "funclist"), }, @@ -150,6 +153,7 @@ var ( }, "worldtask": { common.MF(comm.ModuleWorldtask, worldtask.WorldtaskSubtypeMine), + common.MF(comm.ModuleWorldtask, "check"), }, "smithy": { common.MF(comm.ModuleSmithy, "customer"), @@ -183,6 +187,13 @@ var ( Rsp: &pb.GMCmdResp{}, Enabled: true, }, + common.MF(comm.ModuleGM, "gi"): { + NavLabel: "实例配置", + Desc: "全局实例配置", + MainType: string(comm.ModuleGM), + SubType: "gi", + Enabled: true, + }, "reddot": { NavLabel: "红点", MainType: string(comm.ModuleReddot), @@ -795,6 +806,13 @@ var ( SubType: worldtask.WorldtaskSubtypeMine, Enabled: true, }, + common.MF(comm.ModuleWorldtask, "check"): { + NavLabel: "模拟", + Desc: "世界任务自动执行模拟", + MainType: string(comm.ModuleWorldtask), + SubType: "check", + Enabled: true, + }, // smithy string(comm.ModuleSmithy): { NavLabel: "铁匠铺", diff --git a/cmd/v2/lib/pb/task_protocol.go b/cmd/v2/lib/pb/task_protocol.go index e64bcc659..67115fd9c 100644 --- a/cmd/v2/lib/pb/task_protocol.go +++ b/cmd/v2/lib/pb/task_protocol.go @@ -19,4 +19,14 @@ var ( Rsp: &pb.AcademyReceiveResp{}, }, } + + //worldtask + WorldtaskCase = map[string]*model.TestCase{ + common.MF(comm.ModuleWorldtask, "accept"): { + NavLabel: "接取任务", + MainType: string(comm.ModuleWorldtask), + SubType: "accept", + Enabled: true, + }, + } ) diff --git a/cmd/v2/model/testcase.go b/cmd/v2/model/testcase.go index 6ddd87527..416db23e2 100644 --- a/cmd/v2/model/testcase.go +++ b/cmd/v2/model/testcase.go @@ -13,4 +13,5 @@ type TestCase struct { Enabled bool //是否启用 // View MyCaseView //视图 Print func(rsp proto.Message) string //定义打印 -} \ No newline at end of file + Sort int32 //顺序号 +} diff --git a/cmd/v2/ui/app_testcase.go b/cmd/v2/ui/app_testcase.go index 66f365209..397d248c3 100644 --- a/cmd/v2/ui/app_testcase.go +++ b/cmd/v2/ui/app_testcase.go @@ -99,6 +99,7 @@ func (a *appTester) LazyInit(service service.PttService, obs observer.Observer) formCard, resPanel, ) + panel.Offset = 0.8 content.Objects = append(content.Objects, panel) } else { logrus.WithFields(logrus.Fields{"mainType": t.MainType, "subType": t.SubType}).Warn("no view") diff --git a/cmd/v2/ui/navview.go b/cmd/v2/ui/navview.go index f010e2092..806f66ae1 100644 --- a/cmd/v2/ui/navview.go +++ b/cmd/v2/ui/navview.go @@ -2,10 +2,10 @@ package ui import ( "go_dreamfactory/cmd/v2/lib/common" - "go_dreamfactory/cmd/v2/ui/views" "go_dreamfactory/cmd/v2/model" "go_dreamfactory/cmd/v2/service" "go_dreamfactory/cmd/v2/service/observer" + formview "go_dreamfactory/cmd/v2/ui/views" "go_dreamfactory/comm" "go_dreamfactory/modules/friend" "go_dreamfactory/modules/growtask" @@ -33,6 +33,7 @@ var ( ViewRegister = map[string]MyCaseView{ // gm common.MF(comm.ModuleGM, "cmd"): &formview.BingoView{}, + common.MF(comm.ModuleGM, "gi"): &formview.GlobalConfView{}, // reddot common.MF(comm.ModuleReddot, "get"): &formview.ReddotView{}, //sys @@ -113,6 +114,7 @@ var ( common.MF(comm.ModuleGrowtask, growtask.GrowtaskSubTypeList): &formview.GrowtaskListView{}, //worldtask common.MF(comm.ModuleWorldtask, worldtask.WorldtaskSubtypeMine): &formview.WorldtaskMineView{}, + common.MF(comm.ModuleWorldtask, "check"): &formview.CheckWorldtaskView{}, //smithy common.MF(comm.ModuleSmithy, "customer"): &formview.SmithyView{}, //武馆派遣 diff --git a/cmd/v2/ui/tool_pb.go b/cmd/v2/ui/tool_pb.go index 2362c1442..1ad1fb17e 100644 --- a/cmd/v2/ui/tool_pb.go +++ b/cmd/v2/ui/tool_pb.go @@ -245,7 +245,8 @@ func (f *folderList) initItem(dir string) { for _, file := range files { if file.IsDir() { - if file.Name() == ".vscode" { + if file.Name() == ".vscode"|| + file.Name() == ".svn" { continue } fm := common.Item{ diff --git a/cmd/v2/ui/views/checkworldtask.go b/cmd/v2/ui/views/checkworldtask.go new file mode 100644 index 000000000..6a291b8bc --- /dev/null +++ b/cmd/v2/ui/views/checkworldtask.go @@ -0,0 +1,67 @@ +package formview + +import ( + "go_dreamfactory/cmd/v2/lib/common" + "go_dreamfactory/cmd/v2/model" + + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/container" + "fyne.io/fyne/v2/theme" + "fyne.io/fyne/v2/widget" + + cfg "go_dreamfactory/sys/configure/structs" +) + +// 世界任务检查 +type CheckWorldtaskView struct { + BaseformView + taskList *common.ItemList //世界任务执行过程列表 +} + +// - 检查世界任务状态 +// 1. 输入任务ID 查询 任务状态 +// 2. 查询所有任务执行结果 + +// - 模拟世界任务流程 +// 1.根据配置自动执行所有流程 +// 2.输出每个任务执行过程(文件) +// 3.如果有异常,输出执行错误原因 +func (view *CheckWorldtaskView) CreateView(t *model.TestCase) fyne.CanvasObject { + //taskId entry + // taskId:= widget.NewEntry() + + //输出每个任务执行过程(文件) + path := widget.NewEntry() + jsonPathEntry := widget.NewEntry() + des := widget.NewEntry() + mockForm := widget.NewForm( + widget.NewFormItem("任务类型", des), + widget.NewFormItem("Json配置", jsonPathEntry), + widget.NewFormItem("结果目录", path), + ) + + view.taskList = common.NewItemList() + + view.taskList.ItemList = view.taskList.CreateList() + + helpBtn := widget.NewButtonWithIcon("", theme.HelpIcon(), func() {}) + mockBtn := widget.NewButton("模拟执行", func() { + commCfg := &common.Config{ + Path: jsonPathEntry.Text, + } + // 读取配置 + if tb, err := cfg.NewTables(commCfg.Loader); err == nil { + tb.WorldTask.GetDataList() + } + // 读取协议 + // 设置协议参数 + // 输出结果 + }) + top := container.NewHBox() + bottom := container.NewHBox(helpBtn, mockBtn) + c := container.NewBorder(top, nil, nil, nil, view.taskList.ItemList) + layout := container.NewVSplit( + container.NewBorder(nil, bottom, nil, nil, container.NewGridWithColumns(2, mockForm)), c) + layout.Offset = 0.2 + return layout +} diff --git a/cmd/v2/ui/views/globalview.go b/cmd/v2/ui/views/globalview.go new file mode 100644 index 000000000..e56a9f3f2 --- /dev/null +++ b/cmd/v2/ui/views/globalview.go @@ -0,0 +1,59 @@ +package formview + +import ( + os_storage "go_dreamfactory/cmd/v2/lib/storage" + "go_dreamfactory/cmd/v2/model" + + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/container" + "fyne.io/fyne/v2/widget" + "github.com/sirupsen/logrus" +) + +// 全局实例配置 +// redisDb mongoDb + +type GlobalConfView struct { + BaseformView + storage os_storage.Storage + conf *os_storage.Config +} + +func (this *GlobalConfView) CreateView(t *model.TestCase) fyne.CanvasObject { + // load + this.storage, _ = os_storage.NewOSStorage() + var err error + this.conf, err = this.storage.LoadConfig() + if err != nil { + logrus.Error(err) + return &fyne.Container{} + } + //redis form + redisForm := widget.NewForm() + //mongo form + mongoUrl := widget.NewEntry() + user := widget.NewEntry() + passd := widget.NewEntry() + mongoDatabase := widget.NewEntry() + mongoForm := widget.NewForm( + widget.NewFormItem("Addr", mongoUrl), + widget.NewFormItem("User", user), + widget.NewFormItem("Pass", passd), + widget.NewFormItem("DBName", mongoDatabase), + ) + + if this.conf.ServiceDBInfo != nil { + user.Text = this.conf.MgoDB.Name + passd.Text = this.conf.MgoDB.Password + mongoUrl.Text = this.conf.MgoDB.Host + mongoDatabase.Text = this.conf.MgoDB.Database + } + + bottomBtn := widget.NewButton("保存", func() { + + }) + + layout := container.NewGridWithRows(2, redisForm, mongoForm) + c := container.NewBorder(nil, bottomBtn, nil, nil, layout) + return c +} diff --git a/modules/hero/module.go b/modules/hero/module.go index 849b1e8b1..f1db05e35 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -35,19 +35,19 @@ type Hero struct { chat comm.IChat } -//模块名 +// 模块名 func (this *Hero) GetType() core.M_Modules { return comm.ModuleHero } -//模块初始化接口 注册用户创建角色事件 +// 模块初始化接口 注册用户创建角色事件 func (this *Hero) 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 *Hero) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) @@ -77,7 +77,7 @@ func (this *Hero) Start() (err error) { return } -//创建单个叠加英雄 +// 创建单个叠加英雄 func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string, num int32) (hero *pb.DBHero, bFirst bool, atno []*pb.UserAtno, code pb.ErrorCode) { var ( err error @@ -112,7 +112,7 @@ func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string, return } -//获取英雄 +// 获取英雄 func (this *Hero) GetHeroByObjID(uid, heroId string) (*pb.DBHero, pb.ErrorCode) { hero := this.modelHero.getOneHero(uid, heroId) if hero == nil { @@ -121,7 +121,7 @@ func (this *Hero) GetHeroByObjID(uid, heroId string) (*pb.DBHero, pb.ErrorCode) return hero, pb.ErrorCode_Success } -//佩戴装备 +// 佩戴装备 func (this *Hero) UpdateEquipment(session comm.IUserSession, hero *pb.DBHero, equip []*pb.DB_Equipment) (code pb.ErrorCode) { if hero == nil { @@ -177,12 +177,12 @@ func (this *Hero) SendRdTask(session comm.IUserSession) { go this.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) } -//英雄列表 +// 英雄列表 func (this *Hero) GetHeroList(uid string) []*pb.DBHero { return this.modelHero.getHeroList(uid) } -//查询英雄数量 +// 查询英雄数量 func (this *Hero) QueryHeroAmount(uId string, heroCfgId string) (amount uint32) { heroes := this.GetHeroList(uId) for _, v := range heroes { @@ -257,7 +257,7 @@ func (this *Hero) GetSpecifiedHero(session comm.IUserSession, heroConfId string, return } -//Event-------------------------------------------------------------------------------------------------玩家离线 +// Event-------------------------------------------------------------------------------------------------玩家离线 func (this *Hero) EventUserOffline(uid, sessionid string) { this.modelHero.RemoveUserHeroInfo(uid) } @@ -635,7 +635,7 @@ func (this *Hero) GetTujianHeroNum(uid string) int32 { return int32(len(this.modelHero.getHeroList(uid))) } -////拥有觉醒至A级的B星英雄N个 +// //拥有觉醒至A级的B星英雄N个 func (this *Hero) CheckJuexingHeroNum(uid string, juexingLv int32, star int32) int32 { tmp := make([]*pb.DBHero, 0) for _, v := range this.modelHero.getHeroList(uid) { @@ -911,7 +911,7 @@ func (this *Hero) RegisterInstructor(session comm.IUserSession, heroOid []string return } -//DrawCard_ContinuousRestriction_Camp +// DrawCard_ContinuousRestriction_Camp func (this *Hero) DrawCardContinuousRestrictionCamp(cardId string, race map[int32]int32, sz []int32, data []*cfg.GameDrawCardData) (card string) { card = cardId cfgDraw := this.ModuleTools.GetGlobalConf() // 读取抽卡配置文件 diff --git a/modules/rtask/module.go b/modules/rtask/module.go index f8904c104..2fca8fab4 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -270,7 +270,7 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (condis []*rtaskCondHandle) } // 处理触发的任务 -func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType comm.TaskType, params ...int32) (code pb.ErrorCode) { +func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType comm.TaskType, params ...int32) (condIds []int32, code pb.ErrorCode) { uid := session.GetUserId() var handles []*rtaskCondHandle @@ -284,7 +284,7 @@ func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType com string(comm.Rpc_ModuleRtaskSendTask), pb.RPCRTaskReq{Uid: uid, TaskType: int32(rtaskType), Param: params}, nil); err != nil { - this.Errorln(err) + log.Errorln(err) } return } @@ -305,48 +305,8 @@ func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType com code = pb.ErrorCode_DBError return } + condIds = append(condIds, conf.Id) } - - //任务完成则推送 - if code = this.CheckCondi(uid, conf.Id); code == pb.ErrorCode_Success { - module, err := this.service.GetModule(comm.ModuleWorldtask) - if err == nil { - if worldtask, ok := module.(comm.IWorldtask); ok { - if err := worldtask.TaskCondFinishNotify(session, conf.Id); err != nil { - log.Error("任务条件达成通知", - log.Field{Key: "uid", Value: uid}, - log.Field{Key: "condId", Value: conf.Id}, - log.Field{Key: "err", Value: err.Error()}, - ) - } - } - } - userModule, err := this.service.GetModule(comm.ModuleUser) - if err == nil { - // 公会 - if user, ok := userModule.(comm.IUser); ok { - ex, err := user.GetUserExpand(uid) - if err == nil && ex.SociatyId != "" { - sociatyModule, err := this.service.GetModule(comm.ModuleSociaty) - if err != nil { - return - } - if sociaty, ok := sociatyModule.(comm.ISociaty); ok { - if err2 := sociaty.TaskcondNotify(uid, ex.SociatyId, conf.Id); err2 != nil { - log.Error("公会任务条件达成通知", - log.Field{Key: "uid", Value: uid}, - log.Field{Key: "sociatyId", Value: ex.SociatyId}, - log.Field{Key: "condId", Value: conf.Id}, - log.Field{Key: "err", Value: err2.Error()}, - ) - } - this.processOneTask(session, comm.Rtype156, 1) - } - } - } - } - } - } return @@ -371,6 +331,7 @@ func (this *ModuleRtask) TriggerTask(uid string, taskParams ...*comm.TaskParam) record.Id = primitive.NewObjectID().Hex() record.Ctime = configure.Now().Unix() if err := this.modelRtaskRecord.Add(uid, record); err != nil { + log.Errorln(err) return } } @@ -378,26 +339,75 @@ func (this *ModuleRtask) TriggerTask(uid string, taskParams ...*comm.TaskParam) this.modelRtaskRecord.record = record + var ( + condIds []int32 + ) for _, tp := range taskParams { - // this.Debug("任务触发", - // log.Field{Key: "uid", Value: uid}, - // log.Field{Key: "type", Value: tp.TT}, - // log.Field{Key: "params", Value: tp.Params}) + this.Debug("任务触发", + log.Field{Key: "uid", Value: uid}, + log.Field{Key: "type", Value: tp.TT}, + log.Field{Key: "params", Value: tp.Params}) - if code := this.processOneTask(session, tp.TT, tp.Params...); code != pb.ErrorCode_Success { + ids, code := this.processOneTask(session, tp.TT, tp.Params...) + if code != pb.ErrorCode_Success { // this.Error("任务处理", log.Field{Key: "uid", Value: uid}, log.Field{Key: "code", Value: code}) } - session.Push() + condIds = append(condIds, ids...) + + this.Debug("已处理的任务", log.Field{Key: "condIds", Value: ids}) comm.PuttaskParam(tp) } update := map[string]interface{}{ - "vals": record.Vals, + "vals": this.modelRtaskRecord.record.Vals, } this.modelRtaskRecord.Change(uid, update) + for _, condId := range condIds { + //任务完成则推送 + if code := this.CheckCondi(uid, condId); code == pb.ErrorCode_Success { + module, err := this.service.GetModule(comm.ModuleWorldtask) + if err == nil { + if worldtask, ok := module.(comm.IWorldtask); ok { + if err := worldtask.TaskCondFinishNotify(session, condId); err != nil { + log.Error("任务条件达成通知", + log.Field{Key: "uid", Value: uid}, + log.Field{Key: "condId", Value: condId}, + log.Field{Key: "err", Value: err.Error()}, + ) + } + } + } + userModule, err := this.service.GetModule(comm.ModuleUser) + if err == nil { + // 公会 + if user, ok := userModule.(comm.IUser); ok { + ex, err := user.GetUserExpand(uid) + if err == nil && ex.SociatyId != "" { + sociatyModule, err := this.service.GetModule(comm.ModuleSociaty) + if err != nil { + return + } + if sociaty, ok := sociatyModule.(comm.ISociaty); ok { + if err2 := sociaty.TaskcondNotify(uid, ex.SociatyId, condId); err2 != nil { + log.Error("公会任务条件达成通知", + log.Field{Key: "uid", Value: uid}, + log.Field{Key: "sociatyId", Value: ex.SociatyId}, + log.Field{Key: "condId", Value: condId}, + log.Field{Key: "err", Value: err2.Error()}, + ) + } + this.processOneTask(session, comm.Rtype156, 1) + } + } + } + } + } + } + + session.Push() this.PutUserSession(session) return } @@ -477,7 +487,7 @@ func (this *ModuleRtask) Rpc_ModuleRtaskSendTask(ctx context.Context, args *pb.R return } else { this.processOneTask(session, comm.TaskType(args.TaskType), args.Param...) - session.Push() + // session.Push() } return } diff --git a/modules/sociaty/api_cross_dismiss.go b/modules/sociaty/api_cross_dismiss.go index c329438f2..0823f0856 100644 --- a/modules/sociaty/api_cross_dismiss.go +++ b/modules/sociaty/api_cross_dismiss.go @@ -7,7 +7,7 @@ import ( "go_dreamfactory/utils" ) -// 公会解散 +// 公会解散/取消解散 func (this *apiComp) DismissCheck(session comm.IUserSession, req *pb.SociatyDismissReq) (code pb.ErrorCode) { if req.Dismiss > 1 { diff --git a/modules/sociaty/api_cross_search.go b/modules/sociaty/api_cross_search.go index e9c8e65b2..8724e51d9 100644 --- a/modules/sociaty/api_cross_search.go +++ b/modules/sociaty/api_cross_search.go @@ -22,7 +22,7 @@ func (this *apiComp) Search(session comm.IUserSession, req *pb.SociatySearchReq) rsp := &pb.SociatySearchResp{} sociaty := this.module.modelSociaty.findByName(req.Name) - if sociaty != nil { + if sociaty != nil && sociaty.Id != "" { rsp.List = append(rsp.List, sociaty) }