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