backend: 接入 SQLite 数据库 + 开单后台按功能重写

Browse Source
- store.py(新):卡密 / 订单信息 / 爱发电账本 / 呼叫记录 / 小块状态进 <DATA_DIR>/ys.db;
  第一次启动自动建库并导入旧 JSON(旧文件不动),admin.py db check/backup/export
- server.py / admin.py 存取换到库上,路由与接口字段不变;calls.jsonl 照旧追加
- 管理接口新增 calls / call-done / retry,codes 支持 q 搜索
- ys_admin.py 页面重写:待处理 / 订单 / 卡密 / 福利券 / 呼叫·反馈 / 开单工具
- tests/数据库测试.py(37 条,假数据);回归 27 条照旧全过
- 交接说明(数据库一节、面板一节)、回执第二轮、交付清单更新

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yws
2026-10-05 16:20:45 +00:00
co-authored by Claude Opus 5.5
parent 651d21d882
commit 51212a07c0
11 changed files with 1743 additions and 798 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ Windows 下用 `pythonw.exe` 起。具体参数看 `backend-tools/make_order.py`
## 交付清单(自查用)
- [x] 网站后端:`server.py` / `admin.py` / `pngcheck.py`,已脱敏
- [x] 网站后端:`server.py` / `admin.py` / `pngcheck.py` / `store.py`(数据库,2026-10-05 加),已脱敏
- [x] 工具后端:19 个文件(含 `.bat` / `.ps1` / `.html` / 共用的 `skincheck.js` / Blender 脚本),已脱敏
- [x] 两份交接文档(含《我们的思路与方法》)
- [x] 三个模板工程,已脱敏(等长替换,文件字节数未变)