...
|
...
|
@@ -89,12 +89,11 @@ 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 != "" {
|
|
|
fmt.Print(deadline, "\n")
|
|
|
t, _ := time.ParseInLocation("2006-01-02", deadline.(string), time.UTC)
|
|
|
fmt.Print(t, "\n")
|
|
|
//newDeadline := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 0, time.UTC)
|
|
|
//fmt.Print(newDeadline, "\n")
|
|
|
query = query.Where(`exchange_cash_activity.deadline >= ?`, t)
|
|
|
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)
|
|
|
query = query.Where(`exchange_cash_activity.deadline >= ?`, newDeadlineStart)
|
|
|
query = query.Where(`exchange_cash_activity.deadline <= ?`, newDeadlineEnd)
|
|
|
}
|
|
|
if offset, ok := queryOptions["offset"]; ok {
|
|
|
offset := offset.(int)
|
...
|
...
|
|