feat: 重构AI推荐功能并优化爬虫基础URL

重构前端AI推荐组件,移除本地过滤逻辑,改为从后端获取日期范围内的数据
新增AI服务模块,包含Prompt和推荐逻辑
为投标服务添加按日期范围查询接口
统一各爬虫服务的baseURL格式
This commit is contained in:
dmy
2026-01-12 18:59:17 +08:00
parent 61520e9ebf
commit 3d269ce9d1
16 changed files with 131 additions and 51 deletions

View File

@@ -87,4 +87,22 @@ export class BidsService {
.orderBy('bid.publishDate', 'DESC')
.getMany();
}
async getBidsByDateRange(startDate?: string, endDate?: string) {
const qb = this.bidRepository.createQueryBuilder('bid');
if (startDate) {
const start = new Date(startDate);
start.setHours(0, 0, 0, 0);
qb.andWhere('bid.publishDate >= :startDate', { startDate: start });
}
if (endDate) {
const end = new Date(endDate);
end.setHours(23, 59, 59, 999);
qb.andWhere('bid.publishDate <= :endDate', { endDate: end });
}
return qb.orderBy('bid.publishDate', 'DESC').getMany();
}
}