dao = $dao; } /** * Common: 查询模型 * Author: wu-hui * Time: 2024/03/27 17:55 * @param $where * @return \app\common\model\user\UserBrokerageApplyFormal */ public function searchModel($where){ return $this->dao->searchModel($where); } /** * Common: 列表获取 * Author: wu-hui * Time: 2024/03/27 17:56 * @param $search * @param $page * @param $limit * @param string $field * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function getList($search, $page, $limit, $field = '*'){ $query = $this->dao->searchModel($search); $list = $query ->field($field) ->order('create_time desc,id desc') ->page($page, $limit) ->select(); $count = $query->count(); return compact('count', 'list'); } }