1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- namespace app\services\other;
- use app\dao\other\CategoryDao;
- use app\services\BaseServices;
- use crmeb\traits\ServicesTrait;
- class CategoryServices extends BaseServices
- {
- use ServicesTrait;
- protected $cacheName = 'crmeb_cate';
-
- public function __construct(CategoryDao $dao)
- {
- $this->dao = $dao;
- }
-
- public function getCateList(array $where = [], array $field = ['*'], array $with = [])
- {
- [$page, $limit] = $this->getPageValue();
- $data = $this->dao->getCateList($where, $page, $limit, $field, $with);
- $count = $this->dao->count($where);
- return compact('data', 'count');
- }
-
- public function getTableCodeCateList(array $where = [], array $field = ['*'], array $with = [])
- {
- $data = $this->dao->getCateList($where, 0, 0, $field, $with);
- return $data;
- }
- }
|