From cd434745c863bdae976ce901c58b96eb2ea8cd1a Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 9 Dec 2023 11:45:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/product/StoreSpu.php | 2 +- app/controller/merchant/store/StoreImport.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controller/api/store/product/StoreSpu.php b/app/controller/api/store/product/StoreSpu.php index 01c1dbd4..76bff57e 100644 --- a/app/controller/api/store/product/StoreSpu.php +++ b/app/controller/api/store/product/StoreSpu.php @@ -71,7 +71,7 @@ class StoreSpu extends BaseController unset($where['type_id'], $where['street_id']); $where['is_gift_bag'] = 0; - $where['product_type'] = 0; + $where['product_type'] = $where['product_type']??0; $where['order'] = $where['order'] ?: 'star'; if ($where['is_trader'] != 1) unset($where['is_trader']); $data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo); diff --git a/app/controller/merchant/store/StoreImport.php b/app/controller/merchant/store/StoreImport.php index 4eb82a7e..e0bcfac6 100644 --- a/app/controller/merchant/store/StoreImport.php +++ b/app/controller/merchant/store/StoreImport.php @@ -87,7 +87,7 @@ class StoreImport extends BaseController $file = $this->request->file('file'); if (!$file) return app('json')->fail('请上传EXCEL文件'); $file = is_array($file) ? $file[0] : $file; - validate(["file|文件" => ['fileExt' => 'xlsx',]])->check(['file' => $file]); + validate(["file|文件" => ['fileExt' => 'xlsx',]],['请上传xlsx后缀的文件'])->check(['file' => $file]); $upload = UploadService::create(1); $ret = $upload->to('excel')->move('file'); if ($ret === false) return app('json')->fail($upload->getError());