| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace app\extra\service\cutter;
- use app\extra\basic\Service;
- use app\extra\dao\cutter\CutterApplyDao;
- class CutterApplyService extends Service
- {
- /**
- * 设置模型
- * @return string
- */
- public function __construct()
- {
- $this->dao = new CutterApplyDao();
- }
- /**
- * 列表
- * @param array $param
- */
- public function getList(array $param = [],string $field = '*', int $page = 0,int $limit = 0,string $order = 'id desc')
- {
- $list = $this->dao->getList($this->searchFilter($param),$field,$page,$limit,$order);
- $count = $this->dao->count($this->searchFilter($param));
- return compact('list','count');
- }
- protected function searchFilter(array $param = []): array
- {
- $filter = [];
- !empty($param['status']) && $filter[] = ["status", '=', $param['status']];
- !empty($param['is_del']) && $filter[] = ["is_del", '=', $param['is_del']];
- return $filter;
- }
- }
|