Files
break c8052df8eb
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m30s
补充退款列表应当让本店铺的人看见
2026-08-18 11:44:30 +08:00

27 lines
1022 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.
## Why
生产环境尚未执行审计物理清理时,留存边界查询中的 `MAX(range_end)` 返回 SQL `NULL`,当前实现无法扫描该值,导致 `GET /api/admin/audit/events` 等审计查询返回服务端错误。
## What Changes
- 将审计及外部交互日志留存边界的可空聚合结果作为可空时间处理。
- 没有完成物理清理记录时,审计查询继续返回在线数据,且 `archived_before` 保持为空。
- 没有在线审计或集成交互数据时,保留现有的当月起始时间兜底边界。
## Capabilities
### New Capabilities
无。
### Modified Capabilities
- `operations-audit`: 审计调查在尚无已完成物理清理记录时仍可查询在线审计事实。
## Impact
- 代码:`internal/query/retention/retention.go`
- API修复全局审计事件、时间线、资源活动、风险和资金审计等依赖留存边界的既有查询。
- 数据库:无迁移、无数据修复。
- 部署:仅需重新构建和发布 API 二进制。