From 19e083aa5780f7426a0b8cf247d2c26697b51a08 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 4 Jul 2023 18:54:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/api_trade.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/smithy/api_trade.go b/modules/smithy/api_trade.go index fcf0474ab..dfd49c61b 100644 --- a/modules/smithy/api_trade.go +++ b/modules/smithy/api_trade.go @@ -58,7 +58,12 @@ func (this *apiComp) Sell(session comm.IUserSession, req *pb.SmithySellReq) (err rsp := &pb.SmithySellResp{ CustomerId: req.CustomerId, EquipIds: req.EquipIds, - Customers: cus.Customers, + } + + if cus != nil { + rsp.Customers = cus.Customers + } else { + rsp.Customers = []*pb.CustomerInfo{} } session.SendMsg(string(this.module.GetType()), "sell", rsp)