|
@@ -317,14 +317,12 @@ class StoreCategoryServices extends BaseServices
|
|
|
public function getCategory(array $where)
|
|
public function getCategory(array $where)
|
|
|
{
|
|
{
|
|
|
[$page, $limit] = $this->getPageValue();
|
|
[$page, $limit] = $this->getPageValue();
|
|
|
- if ($limit>0) {
|
|
|
|
|
|
|
+ if ($limit) {
|
|
|
return $this->dao->getALlByIndex($where, 'id,cate_name,pid,pic', $limit);
|
|
return $this->dao->getALlByIndex($where, 'id,cate_name,pid,pic', $limit);
|
|
|
} else {
|
|
} 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();
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|