商户NPC读配置

This commit is contained in:
wh_zcy 2023-03-30 16:49:16 +08:00
parent 2c35ca7388
commit d4c92efa5b

View File

@ -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 {