This commit is contained in:
oneao committed 2025-11-19 22:55:09 +08:00
1 parent 49285f1df2
commit 63b168affc
7 files changed
+284 -324

No files matched your search

@@ -64,6 +64,8 @@ func queryMoneyRecords(c *router.Context) error {
recordMonth := bodyData.GetString("record_time")
fmt.Println(recordMonth)
// 解析年月
startTime, err := time.Parse("2006-01", recordMonth)
if err != nil {
@@ -82,7 +84,7 @@ func queryMoneyRecords(c *router.Context) error {
muc.type AS category_type
FROM money_record mr
LEFT JOIN money_user_category muc ON mr.category_id = muc.id
WHERE mr.create_time BETWEEN '%s' AND '%s'
WHERE mr.record_time BETWEEN '%s' AND '%s'
ORDER BY mr.record_time DESC, mr.create_time DESC
`, startTime.Format("2006-01-02 15:04:05"), endTime.Format("2006-01-02 15:04:05"))