|
@@ -135,6 +135,19 @@ export class IncubatorService extends BaseServiceV2 {
|
|
|
return { nameList, list };
|
|
|
}
|
|
|
|
|
|
+ // 查询相关领域的企业
|
|
|
+ async cfield(query) {
|
|
|
+ const { industry } = query;
|
|
|
+ const builder = await this.cModel
|
|
|
+ .createQueryBuilder('cirelation')
|
|
|
+ .select(['cirelation.company'])
|
|
|
+ .setFindOptions({ where: { incubator: get(query, 'incubator'), status: get(query, 'status') } });
|
|
|
+ const list = await builder.getMany();
|
|
|
+ const companyids = list.map(i => i.company);
|
|
|
+ const { data, total } = await this.companyService.query({ id: companyids, industry }, {});
|
|
|
+ return { data, total };
|
|
|
+ }
|
|
|
+
|
|
|
// 孵化器专属企业查询
|
|
|
async list(query) {
|
|
|
const { skip = 0, limit = 0, is_tech, is_new, ...info } = query;
|