dy-dashboard/vault/知识库/工作指南/训练记录/2026-08-11-修复详情弹窗保存产生大量碎片日志.md
2026-10-28 11:14:17 +08:00

8 lines
933 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 10. 修复详情弹窗保存产生大量碎片日志
**旭东 → OpenClaw:**
> 我刚测试,出现了很多这种日志(贴出多条"数据变更 - POST /api/domestic/orders/update;id:1969;field:xxx;value:xxx")
**OpenClaw 响应:**
已修复。原因:详情弹窗保存时把弹窗内所有字段(含未修改的)逐条提交到单字段更新接口,审计钩子对每个请求各记一条"数据变更"日志。优化:1) 前端只收集实际变化的字段(对比原始值data-orig);2) 改为一次请求提交到新增的批量接口 /api/{domestic|overseas|packaging}/orders/update_fields;3) 后端只记录一条合并业务日志(操作页面=对应订单管理,操作字段=变化的字段名,操作内容=字段新值)。未修改任何字段时直接关闭、不产生日志。已重启测试服务并验证:改2个字段仅1条日志。Git提交 67528e8。已记录