mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-06-09 15:07:49 +00:00
feat: add date range filter to marketing list API
Added start_date, end_date, and filter_by query parameters to the GET /api/marketing/ endpoint. Users can now filter marketing records by a date range using either so_date (Sales Order date, default) or created_at as the target column. Changes: - validation: added StartDate, EndDate (YYYY-MM-DD format), and FilterBy (oneof: so_date, created_at) to DeliveryOrderQuery struct - controller: parse the three new query params in GetAll handler - service: apply >=start / <end+1day date range filter in the query modifier using the existing utils.ParseDateRangeForQuery helper Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,9 @@ func (u *DeliveryOrdersController) GetAll(c *fiber.Ctx) error {
|
||||
WarehouseID: uint(c.QueryInt("warehouse_id", 0)),
|
||||
SortBy: sortBy,
|
||||
SortOrder: sortOrder,
|
||||
StartDate: strings.TrimSpace(c.Query("start_date", "")),
|
||||
EndDate: strings.TrimSpace(c.Query("end_date", "")),
|
||||
FilterBy: strings.TrimSpace(c.Query("filter_by", "")),
|
||||
}
|
||||
|
||||
if isAllExcelExportRequest(c) {
|
||||
|
||||
Reference in New Issue
Block a user