Enhance Tender Management with Company-Based Matching and API Updates

- Updated the tender service to include company-based matching for tenders, allowing for more relevant results based on company CPV codes.
- Modified the ListTenders endpoint to accept a company ID parameter for calculating match percentages and sorting tenders accordingly.
- Refactored the tender response structure to include match percentage and days until deadline for better client-side handling.
- Updated API documentation to reflect changes in the tender listing functionality and added new endpoints for public tender access.
- Removed deprecated customer-related methods and streamlined customer listing functionality for improved clarity and performance.
This commit is contained in:
n.nakhostin
2025-08-13 19:47:58 +03:30
parent 96c21b8b78
commit 0a23ff985a
13 changed files with 4543 additions and 668 deletions
+7
View File
@@ -86,6 +86,13 @@ func NewTenderRepository(mongoManager *mongopkg.ConnectionManager, logger logger
{Key: "notice_type_code", Value: 1},
{Key: "status", Value: 1},
}),
// Index for CPV matching queries
*mongopkg.NewIndex("cpv_matching_idx", bson.D{
{Key: "status", Value: 1},
{Key: "main_classification", Value: 1},
{Key: "additional_classifications", Value: 1},
{Key: "publication_date", Value: -1},
}),
// Text index for search
*mongopkg.CreateTextIndex("search_idx", "title", "description"),
}