['title', 'admin_id', 'moeny', 'type', 'status', 'content'], ]; } /** * @notes 获取任务模板列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2023/08/06 17:30 */ public function lists(): array { return TaskTemplate::where($this->searchWhere) ->field(['id', 'title', 'admin_id', 'moeny', 'type', 'status', 'content']) ->with(['admin','data_type']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取任务模板数量 * @return int * @author likeadmin * @date 2023/08/06 17:30 */ public function count(): int { return TaskTemplate::where($this->searchWhere)->count(); } }