fix: 修复账单时间显示为UTC时区问题,改为本地时间

- 新增 LocalTime 自定义类型,JSON序列化输出本地时间格式
- 修改 CleanedBill.Time 字段类型为 LocalTime
- 更新 parseTime 函数返回 LocalTime 类型
- 前端添加 formatDateTime 工具函数(兼容处理)
- 版本号更新至 1.0.2
This commit is contained in:
2026-01-11 21:40:27 +08:00
parent d49d9afb3a
commit 8a9de1b328
9 changed files with 107 additions and 14 deletions

View File

@@ -157,7 +157,7 @@ func (r *Repository) CheckCleanedDuplicate(bill *model.CleanedBill) (bool, error
} else {
// 回退到 时间+金额+商户 组合判断
filter = bson.M{
"time": bill.Time,
"time": bill.Time.Time(), // 转换为 time.Time 用于 MongoDB 查询
"amount": bill.Amount,
"merchant": bill.Merchant,
}