Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
chenbo 2023-12-09 13:35:57 +08:00
commit 9ba48e1ab8
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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());