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 {