WIN-2308041133\Administrator 1 miesiąc temu
rodzic
commit
7bf18fbddf

+ 4 - 6
app/services/product/product/StoreCategoryServices.php

@@ -317,14 +317,12 @@ class StoreCategoryServices extends BaseServices
     public function getCategory(array $where)
     {
         [$page, $limit] = $this->getPageValue();
-        if ($limit>0) {
+        if ($limit) {
             return $this->dao->getALlByIndex($where, 'id,cate_name,pid,pic', $limit);
         } else {
-//            return CacheService::remember('CATEGORY', function () {
-//                return $this->dao->getCategory();
-//            });
-            return $this->dao->getALlByIndex($where, 'id,cate_name,pid,pic', 1);
-
+            return CacheService::remember('CATEGORY', function () {
+                return $this->dao->getCategory();
+            });
         }
     }