feat: 添加交易记录的创建和查询API处理器

This commit is contained in:
2026-01-28 23:04:06 +08:00
parent ba02df57c4
commit d588235461

View File

@@ -148,6 +148,10 @@ func (h *TransactionHandler) GetTransactions(c *gin.Context) {
api.BadRequest(c, "Invalid end_date format. Use YYYY-MM-DD or RFC3339 format")
return
}
// If input is just a date (YYYY-MM-DD), set it to the end of that day to be inclusive
if len(endDateStr) == 10 {
endDate = time.Date(endDate.Year(), endDate.Month(), endDate.Day(), 23, 59, 59, 999999999, endDate.Location())
}
input.EndDate = &endDate
}