Commit Graph

12 Commits

Author SHA1 Message Date
a2de8c5078 feat: implement WeChat cross-batch refund reconciliation and fix misc issues
WeChat cross-batch refund reconciliation:
- Add OriginalAmount field to CleanedBill for accurate cumulative refund math
- DeduplicateRawFile detects WeChat status-update rows (已退款/已全额退款) and
  emits WechatRefundUpdates for Go-side reconciliation (Scenario 1)
- WechatPy cleaner surfaces -退款 income rows with no same-batch expense match
  as unresolved_refunds for Go ReconcileRefund (Scenario 2)
- Add ReconcileWechatRefund to repository interface and MongoDB implementation
- upload.go step 15 iterates WechatRefundUpdates and reconciles against bills_cleaned

Bug fixes:
- ReviewStats: add nil repo check to prevent panic when DB is not connected
- JWT: remove hardcoded fallback secret; return 500/401 if JWTSecret not configured
- Remove unused parsePageParam dead code and its strconv import
- BillDetailDrawer: show 不计收支 amount in muted gray instead of red
- test_jd_cleaner.py: replace hardcoded D:\Projects\BillAI path with dynamic __file__ resolution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 21:38:25 +08:00
clz
bb717faac3 fix: resolve CHANGELOG.md path issue for Docker deployment
Some checks failed
Deploy BillAI / Deploy to Production (push) Has been cancelled
- Update changelog.go to use binary directory as base path
  - Uses os.Executable() instead of relative path '..'
  - Automatically adapts to local and Docker environments

- Modify server Dockerfile build context
  - Change context from ./server to project root (.)
  - Update COPY commands for new context
  - Add CHANGELOG.md to container image

- Update AGENTS.md guidelines
  - Explicitly specify relative path format for file references

This ensures the changelog API works correctly in both local development
and Docker deployment environments.
2026-04-02 20:45:24 +08:00
clz
ee163e123d feat: implement dynamic changelog loading from API
- Add GET /api/changelog endpoint to fetch changelog from CHANGELOG.md
- Create service/changelog.go to parse CHANGELOG.md markdown file
- Add handler/changelog.go to handle changelog requests
- Update ChangelogDrawer component to fetch from API instead of hardcoded data
- Export apiFetch from lib/api.ts for public use
- Add changelog parser tests with 14 version entries verified
2026-04-02 17:52:38 +08:00
CHE LIANG ZHAO
3cf39b4664 feat: 支持京东白条账单上传和清洗 2026-01-26 13:44:22 +08:00
CHE LIANG ZHAO
a97a8d6a20 feat: 支持ZIP压缩包上传(含密码保护) 2026-01-23 14:17:59 +08:00
CHE LIANG ZHAO
3b7c1cd82b chore(release): v1.0.7
- README/CHANGELOG: add v1.0.7 entry\n- Server: JWT expiry validated server-side (401 codes)\n- Web: logout/redirect on 401; proxy forwards Authorization\n- Server: bill service uses repository consistently
2026-01-16 11:15:05 +08:00
CHE LIANG ZHAO
4805f94126 fix(server, webhook): 添加 MongoDB 数据持久化和上传前去重功能
- 优化支付宝时间格式解析(支持无前导零格式)
- 修复 webhook 服务编译错误
- 更新版本号至 1.0.5
2026-01-14 14:53:50 +08:00
8a9de1b328 fix: 修复账单时间显示为UTC时区问题,改为本地时间
- 新增 LocalTime 自定义类型,JSON序列化输出本地时间格式
- 修改 CleanedBill.Time 字段类型为 LocalTime
- 更新 parseTime 函数返回 LocalTime 类型
- 前端添加 formatDateTime 工具函数(兼容处理)
- 版本号更新至 1.0.2
2026-01-11 21:40:27 +08:00
6d33132a4a fix: 修复前后端时区问题和日期范围选择器性能
- 前端时区修复:统一使用本地时区格式化日期
- 日期范围选择器优化:使用 untrack 避免循环更新
- 后端时区修复:使用 time.ParseInLocation 指定本地时区
- 其他优化:修复分页逻辑
2026-01-10 01:55:45 +08:00
087ae027cc feat: 完善项目架构并增强分析页面功能
- 新增项目文档和 Docker 配置
  - 添加 README.md 和 TODO.md 项目文档
  - 为各服务添加 Dockerfile 和 docker-compose 配置

- 重构后端架构
  - 新增 adapter 层(HTTP/Python 适配器)
  - 新增 repository 层(数据访问抽象)
  - 新增 router 模块统一管理路由
  - 新增账单处理 handler

- 扩展前端 UI 组件库
  - 新增 Calendar、DateRangePicker、Drawer、Popover 等组件
  - 集成 shadcn-svelte 组件库

- 增强分析页面功能
  - 添加时间范围筛选器(支持本月默认值)
  - 修复 DateRangePicker 默认值显示问题
  - 优化数据获取和展示逻辑

- 完善分析器服务
  - 新增 FastAPI 服务接口
  - 改进账单清理器实现
2026-01-10 01:23:36 +08:00
CHE LIANG ZHAO
c1ffe2e822 feat: server connect mongo 2026-01-08 23:42:01 +08:00
clz
c40a118a3d refactor: 重构项目结构
- 将 Python 代码移至 analyzer/ 目录(含 venv)
- 拆分 Go 服务器代码为模块化结构:
  - config/: 配置加载
  - model/: 请求/响应模型
  - service/: 业务逻辑
  - handler/: API处理器
- 添加 .gitignore 文件
- 删除旧的独立脚本文件
2026-01-07 23:26:32 +08:00