This commit is contained in:
oneao committed 2026-03-05 22:24:22 +08:00
1 parent 173eb2dd37
commit 26ff2381b7
17 files changed
+596 -305

No files matched your search

@@ -51,14 +51,22 @@ func ListFinanceRecords(c fiber.Ctx) error {
endTime = &t
}
categoryId := dto.CategoryId
var categoryId int64 = -1
if dto.CategoryId != nil {
categoryId = *dto.CategoryId
}
var categoryType int16 = -1
if dto.CategoryType != nil {
categoryType = *dto.CategoryType
}
records, err := db.Queries.ListFinanceRecords(c.Context(), repo.ListFinanceRecordsParams{
SpaceID: spaceID,
RecordTime: pgtypex.TimePtrToPgDate(startTime),
RecordTime_2: pgtypex.TimePtrToPgDate(endTime),
Column4: categoryId,
Column5: dto.CategoryType,
Column5: categoryType,
})
if err != nil {
+2 -2
View File
@@ -65,8 +65,8 @@ type FinanceRecord struct {
type ListFinanceRecordsDTO struct {
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
CategoryId int64 `json:"category_id"`
CategoryType int16 `json:"category_type"`
CategoryId *int64 `json:"category_id"`
CategoryType *int16 `json:"category_type"`
}
type ListFinanceRecordsVO struct {