From 4b5ebf92687f93d9f5be3d462304578f75e6aba9 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 8 May 2023 20:06:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/api_sellres.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/user/api_sellres.go b/modules/user/api_sellres.go index ce9ad1ee5..b86af7699 100644 --- a/modules/user/api_sellres.go +++ b/modules/user/api_sellres.go @@ -6,7 +6,7 @@ import ( ) //参数校验 -func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode) { +func (this *apiComp) SellResCheck(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode) { if len(req.Atno) == 0 { code = pb.ErrorCode_ReqParameterError } @@ -14,14 +14,14 @@ func (this *apiComp) SellItemCheck(session comm.IUserSession, req *pb.UserSellRe } //分解道具 -func (this *apiComp) SellItem(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode, data *pb.ErrorData) { +func (this *apiComp) SellRes(session comm.IUserSession, req *pb.UserSellResReq) (code pb.ErrorCode, data *pb.ErrorData) { var ( equip []string // 出售的装备 sale []*pb.UserAssets mapitem map[string]int32 ) mapitem = map[string]int32{} - if code = this.SellItemCheck(session, req); code != pb.ErrorCode_Success { + if code = this.SellResCheck(session, req); code != pb.ErrorCode_Success { return } for _, v := range req.Atno { @@ -32,7 +32,7 @@ func (this *apiComp) SellItem(session comm.IUserSession, req *pb.UserSellResReq) } } if len(mapitem) > 0 { - if c, d := this.module.ModuleItems.SellItem(session, mapitem); c != pb.ErrorCode_Success { + if c, d := this.module.ModuleItems.SellItem(session, mapitem, true); c != pb.ErrorCode_Success { for _, v := range d { sale = append(sale, &pb.UserAssets{ A: v.A,