|
@@ -323,26 +323,14 @@ export class HomeService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取银龄岗位(银龄特色岗位推荐)
|
|
|
|
|
|
|
+ * 获取银龄岗位(3条最新银龄岗数据)
|
|
|
*/
|
|
*/
|
|
|
async getSilverPositions(userId?: number, limit: number = 3): Promise<Job[]> {
|
|
async getSilverPositions(userId?: number, limit: number = 3): Promise<Job[]> {
|
|
|
- // 筛选银龄特色岗位(特别适合银龄群体的岗位)
|
|
|
|
|
|
|
+ // 获取最新发布的银龄岗数据,不筛选关键字
|
|
|
return await this.jobRepo
|
|
return await this.jobRepo
|
|
|
.createQueryBuilder('job')
|
|
.createQueryBuilder('job')
|
|
|
.leftJoinAndSelect('job.company', 'company')
|
|
.leftJoinAndSelect('job.company', 'company')
|
|
|
.where('job.status = :status', { status: 1 })
|
|
.where('job.status = :status', { status: 1 })
|
|
|
- .andWhere(
|
|
|
|
|
- new Brackets(qb => {
|
|
|
|
|
- qb.where('job.title LIKE :silver', { silver: '%银龄%' })
|
|
|
|
|
- .orWhere('job.title LIKE :senior', { senior: '%资深%' })
|
|
|
|
|
- .orWhere('job.title LIKE :expert', { expert: '%专家%' })
|
|
|
|
|
- .orWhere('job.title LIKE :elderly', { elderly: '%老年%' })
|
|
|
|
|
- .orWhere('job.description LIKE :silver', { silver: '%银龄%' })
|
|
|
|
|
- .orWhere('job.description LIKE :senior', { senior: '%资深%' })
|
|
|
|
|
- .orWhere('job.description LIKE :expert', { expert: '%专家%' })
|
|
|
|
|
- .orWhere('job.description LIKE :elderly', { elderly: '%老年%' });
|
|
|
|
|
- })
|
|
|
|
|
- )
|
|
|
|
|
.orderBy('job.createdAt', 'DESC')
|
|
.orderBy('job.createdAt', 'DESC')
|
|
|
.limit(limit)
|
|
.limit(limit)
|
|
|
.getMany();
|
|
.getMany();
|