Преглед на файлове

修复分类显示与筛选

evoxwht преди 2 години
родител
ревизия
092e52d9fd
променени са 3 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 1 0
      crmeb/app/adminapi/route/product.php
  2. 1 1
      crmeb/app/dao/BaseDao.php
  3. 0 2
      crmeb/app/model/product/product/StoreProduct.php

+ 1 - 0
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' => '商品分类新增表单']);
     //商品分类新增

+ 1 - 1
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];
                 }
             }

+ 0 - 2
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);
                 }