['customer_id', 'contract_id', 'collection_acccount'], ]; } /** * @notes 获取列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2023/12/14 16:58 */ public function lists(): array { return FinanceRefundApply::where($this->searchWhere) ->alias('f') ->join('custom c', 'c.id = f.customer_id') ->join('project p', 'p.id = f.contract_id') ->field(['f.*','c.name as custom_name','p.name as project_name','p.project_code']) ->limit($this->limitOffset, $this->limitLength) ->order(['f.id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取数量 * @return int * @author likeadmin * @date 2023/12/14 16:58 */ public function count(): int { return FinanceRefundApply::where($this->searchWhere)->count(); } }