From d4c92efa5b4e23ee5661fa1438dbd30e54628830 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 30 Mar 2023 16:49:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7NPC=E8=AF=BB=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/api_getCustomer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/smithy/api_getCustomer.go b/modules/smithy/api_getCustomer.go index 3ea10f97b..69c844f4e 100644 --- a/modules/smithy/api_getCustomer.go +++ b/modules/smithy/api_getCustomer.go @@ -15,6 +15,10 @@ func (this *apiComp) CustomerCheck(session comm.IUserSession, req *pb.SmithyCust func (this *apiComp) Customer(session comm.IUserSession, req *pb.SmithyCustomerReq) (code pb.ErrorCode, data proto.Message) { customerCount := this.module.configure.GetGlobalConf().SmithyMaxNpc + if customerCount <= 0 { + code = pb.ErrorCode_ConfigNoFound + return + } cus, err := this.module.modelTrade.getDBCustomer(session.GetUserId()) if err != nil { if err == mongo.ErrNoDocuments {