From 5fe3d5c824bc1b44178ee5abd69ca8a56eb46729 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 15 Jan 2024 09:38:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/server/StoreProduct.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controller/api/server/StoreProduct.php b/app/controller/api/server/StoreProduct.php index fd7c0966..370c3b56 100644 --- a/app/controller/api/server/StoreProduct.php +++ b/app/controller/api/server/StoreProduct.php @@ -83,12 +83,13 @@ class StoreProduct extends BaseController { $res = $this->request->params($this->repository::CREATE_PARAMS); $merchant = app()->make(MerchantRepository::class)->get($merId); - if(isset($res['cate_id']) && $res['cate_id'] <0){ - $type_code=Db::name('merchant_type')->where('mer_type_id',$merchant['merchant']['type_id'])->value('type_code'); + if($res['cate_id'] <=0){ + $type_code=Db::name('merchant_type')->where('mer_type_id',$merchant['type_id'])->value('type_code'); if($type_code=='PersonalStore'){ $res['cate_id']=2231; } } + $data = $this->repository->checkParams($res, $merId); $data['mer_id'] = $merId; $data['is_gift_bag'] = 0;