refactor: 移除高优先级投标功能及相关代码

This commit is contained in:
dmy
2026-01-13 20:42:34 +08:00
parent 6825885005
commit 4f4355c1cd
7 changed files with 3 additions and 133 deletions

View File

@@ -33,24 +33,6 @@ export class BidsService {
return { items, total };
}
getHighPriority() {
return this.bidRepository.find({
where: { priority: LessThan(0) }, // This is just a placeholder logic, priority should be > 0
order: { priority: 'DESC', publishDate: 'DESC' },
take: 10,
});
}
// Update logic for priority
async getHighPriorityCorrected() {
return this.bidRepository.createQueryBuilder('bid')
.where('bid.priority > 0')
.orderBy('bid.priority', 'DESC')
.addOrderBy('bid.publishDate', 'DESC')
.limit(10)
.getMany();
}
async createOrUpdate(data: Partial<BidItem>) {
// Use title or a hash of title to check for duplicates
let item = await this.bidRepository.findOne({ where: { title: data.title } });