From c4ff67cc7592a6de2bc858ea031c71256b77947d Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 6 Feb 2024 11:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/module.go | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/modules/equipment/module.go b/modules/equipment/module.go index f407f7d61..357eae598 100644 --- a/modules/equipment/module.go +++ b/modules/equipment/module.go @@ -87,8 +87,9 @@ func (this *Equipment) QueryEquipment(uid string, ids ...string) (equipment []*p if uid == "" || id == "" { this.Errorf("请求参数错误 uid:%s Id:%s", uid, id) errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("uid :%s id :%s", uid, id), } continue } @@ -120,8 +121,9 @@ func (this *Equipment) QueryEquipments(uid string) (equipment []*pb.DB_Equipment if uid == "" { this.Errorf("请求参数错误 uid:%s ", uid) errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("uid :%s ", uid), } return } @@ -347,8 +349,9 @@ func (this *Equipment) SellEquipments(session comm.IUserSession, equs []string) ) if equipments, err = this.modelEquipment.QueryUserEquipmentsByIds(session.GetUserId(), equs); err != nil { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: err.Error(), } return } @@ -438,8 +441,9 @@ func (this *Equipment) RecycleEquipments(session comm.IUserSession, equs []strin ) if equipments, err = this.modelEquipment.QueryUserEquipmentsByIds(session.GetUserId(), equs); err != nil { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: err.Error(), } return } @@ -449,8 +453,9 @@ func (this *Equipment) RecycleEquipments(session comm.IUserSession, equs []strin for i, v := range equipments { if v.HeroId != "" || v.Islock { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("HeroId is nil or is lock:%v", v), } this.Errorf("NoCanSell %v", v) return