From b917b9cd72bb303acf7aff6eef39d25abe830a6b Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 13 Sep 2023 16:36:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9D=90=E9=AA=91=E5=8F=98?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/capturesheep/api_changemts.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/capturesheep/api_changemts.go b/modules/capturesheep/api_changemts.go index 3082907a0..c08dd2164 100644 --- a/modules/capturesheep/api_changemts.go +++ b/modules/capturesheep/api_changemts.go @@ -28,7 +28,14 @@ func (this *apiComp) ChangeMts(session comm.IUserSession, req *pb.CapturesheepCh } return } - + if dragon, err = this.module.dragon.QueryDragonById(session.GetUserId(), req.Mid); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } info.Defmts = dragon.Id if err = this.module.modelCaptureSheep.Change(session.GetUserId(), map[string]interface{}{ "defmts": info.Defmts, @@ -40,6 +47,6 @@ func (this *apiComp) ChangeMts(session comm.IUserSession, req *pb.CapturesheepCh } return } - session.SendMsg(string(this.module.GetType()), "changemts", &pb.CapturesheepChangeMtsResp{}) + session.SendMsg(string(this.module.GetType()), "changemts", &pb.CapturesheepChangeMtsResp{Mid: req.Mid}) return }