From 092e52d9fd097a227714e050030c6b9b1389e566 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 3 Apr 2023 15:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E7=B1=BB=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8E=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/route/product.php | 1 + crmeb/app/dao/BaseDao.php | 2 +- crmeb/app/model/product/product/StoreProduct.php | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crmeb/app/adminapi/route/product.php b/crmeb/app/adminapi/route/product.php index 9ede94a54..d73d2a0b9 100644 --- a/crmeb/app/adminapi/route/product.php +++ b/crmeb/app/adminapi/route/product.php @@ -15,6 +15,7 @@ Route::group('product', function () { Route::get('category', 'v1.product.StoreCategory/index')->option(['real_name' => '商品分类列表']); //商品树形列表 Route::get('category/tree/:type', 'v1.product.StoreCategory/tree_list')->option(['real_name' => '商品分类树形列表']); + Route::get('category/cascader/:type', 'v1.product.StoreCategory/cascader_list')->option(['real_name' => '商品分类树形列表']); //商品分类新增表单 Route::get('category/create', 'v1.product.StoreCategory/create')->option(['real_name' => '商品分类新增表单']); //商品分类新增 diff --git a/crmeb/app/dao/BaseDao.php b/crmeb/app/dao/BaseDao.php index 8563bd493..684e0ca6b 100644 --- a/crmeb/app/dao/BaseDao.php +++ b/crmeb/app/dao/BaseDao.php @@ -310,7 +310,7 @@ abstract class BaseDao if ($responses->hasMethod($method)) { $with[] = $key; } else { - if ($key != 'timeKey') { + if (!in_array($key, ['timeKey', 'store_stock'])) { $otherWhere[] = is_array($value) ? $value : [$key, '=', $value]; } } diff --git a/crmeb/app/model/product/product/StoreProduct.php b/crmeb/app/model/product/product/StoreProduct.php index 432a59843..36728afdc 100644 --- a/crmeb/app/model/product/product/StoreProduct.php +++ b/crmeb/app/model/product/product/StoreProduct.php @@ -326,8 +326,6 @@ class StoreProduct extends BaseModel $query->whereIn('id', function ($query) use ($store_stock) { $query->name('store_product_attr_value')->where('stock', '<', $store_stock)->where('stock', '>', 0)->where('type', 0)->field('product_id')->select(); }); -// $query->where(['is_show' => 1, 'is_del' => 0])->where('stock', '<=', $store_stock)->where('stock', '>', 0); - } else { $query->where(['is_show' => 1, 'is_del' => 0])->where('stock', '>', 0); }