['title', 'admin_id', 'money', '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 { $parmas= $this->request->param(); $where=[]; if(isset($parmas['scheduling_id']) && $parmas['scheduling_id']>0){ $company_id=TaskScheduling::where(['id'=>$parmas['scheduling_id']])->value('company_id'); $where[]= ['company_id','=',$company_id]; } return TaskTemplate::where($this->searchWhere) ->where($where) ->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(); } }