fix update history order
This commit is contained in:
parent
4e84e6ea84
commit
3e0f88cc85
@ -171,7 +171,7 @@ func (b *OrderRepository) GetAllHystoryOrders(ctx context.Context, req entity.Or
|
|||||||
} else {
|
} else {
|
||||||
currentTime := time.Now()
|
currentTime := time.Now()
|
||||||
startOfMonth := time.Date(currentTime.Year(), currentTime.Month(), 1, 0, 0, 0, 0, time.Local)
|
startOfMonth := time.Date(currentTime.Year(), currentTime.Month(), 1, 0, 0, 0, 0, time.Local)
|
||||||
endOfMonth := startOfMonth.AddDate(0, 1, -1)
|
endOfMonth := startOfMonth.AddDate(0, 1, 0).Add(-time.Second)
|
||||||
query = query.Where("orders.created_at BETWEEN ? AND ?", startOfMonth, endOfMonth)
|
query = query.Where("orders.created_at BETWEEN ? AND ?", startOfMonth, endOfMonth)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user