...
|
...
|
@@ -89,9 +89,9 @@ func (repository *ExchangeCashActivityRepository) Find(queryOptions map[string]i |
|
|
query = query.Where(`exchange_cash_activity.activity_name LIKE ?`, fmt.Sprintf("%%%s%%", activityNameMatch.(string)))
|
|
|
}
|
|
|
if deadline, ok := queryOptions["deadline"]; ok && deadline != "" {
|
|
|
t, _ := time.ParseInLocation("2006-01-02", deadline.(string), time.UTC)
|
|
|
newDeadlineStart := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.UTC)
|
|
|
newDeadlineEnd := time.Date(t.Year(), t.Month(), t.Day() + 1, 0, 0, 0, 0 - 1, time.UTC)
|
|
|
t, _ := time.ParseInLocation("2006-01-02", deadline.(string), time.Local)
|
|
|
newDeadlineStart := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.Local)
|
|
|
newDeadlineEnd := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 0, time.Local)
|
|
|
query = query.Where(`exchange_cash_activity.deadline >= ?`, newDeadlineStart)
|
|
|
query = query.Where(`exchange_cash_activity.deadline <= ?`, newDeadlineEnd)
|
|
|
}
|
...
|
...
|
|