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