['project_id', 'competitor_name'], ]; } /** * @notes 获取竞争对手列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2023/11/24 22:01 */ public function lists(): array { return Competitor::where($this->searchWhere) ->field(['id', 'org_id', 'department_id', 'project_id', 'customer_demand_id', 'competitor_name', 'competitor_contacts', 'competitor_contacts_phone', 'competitive_power']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取竞争对手数量 * @return int * @author likeadmin * @date 2023/11/24 22:01 */ public function count(): int { return Competitor::where($this->searchWhere)->count(); } }