feat(shipping-notice): 增强发货通知与审计功能,支持敏感数据控制与哈希链校验
- 更新发货通知工具 API,剥离不可信的操作人身份字段,确保审计安全 - 引入审计事件的哈希链校验机制,支持数据完整性验证 - 增强订单抽取与审计功能,支持敏感快照的访问控制 - 更新相关模型与服务,确保新功能的完整性与可追溯性 - 完善文档与代码注释,反映新的业务逻辑与审计要求
This commit is contained in:
1 parent
95cdfe66b0
commit
d0fe084999
225 files changed
+25923
-6653
No files matched your search
@@ -146,15 +146,48 @@ def _register_builtin_platform_jobs() -> None:
|
||||
))
|
||||
register_platform_job(PlatformJobDefinition(
|
||||
key="shipping-audit-retention",
|
||||
label="货代审计到期清理",
|
||||
label="货代审计到期清理与哈希校验",
|
||||
handler=run_shipping_audit_retention_schedule,
|
||||
description="按三年保留期分批清理到期的货代统一审计事件;支持 dry_run 观测。",
|
||||
description=(
|
||||
"分批清理 retention_expires_at 已到期的历史审计行(新写入永久保留);"
|
||||
"并按 SHIPPING_NOTICE_AUDIT_HASH_VERIFY_ENABLED 抽样校验近期聚合哈希链。"
|
||||
"建议每日调度一次。"
|
||||
),
|
||||
category="shipping",
|
||||
params_schema=(
|
||||
{"key": "limit", "type": "number", "label": "单批上限", "required": False, "default": 1000},
|
||||
{"key": "limit", "type": "number", "label": "清理单批上限", "required": False, "default": 1000},
|
||||
{"key": "dry_run", "type": "boolean", "label": "仅演练", "required": False, "default": False},
|
||||
{
|
||||
"key": "hash_sample_limit",
|
||||
"type": "number",
|
||||
"label": "哈希链抽样条数",
|
||||
"required": False,
|
||||
"default": 200,
|
||||
},
|
||||
),
|
||||
defaults={"limit": 1000, "dry_run": False},
|
||||
defaults={"limit": 1000, "dry_run": False, "hash_sample_limit": 200},
|
||||
))
|
||||
register_platform_job(PlatformJobDefinition(
|
||||
key="shipping-audit-hash-verify",
|
||||
label="货代审计哈希链日检",
|
||||
handler=run_shipping_audit_retention_schedule,
|
||||
description=(
|
||||
"每日抽样校验货代统一审计 previous_event_hash / event_hash 链完整性;"
|
||||
"默认 dry_run=true 不执行清理,仅返回 hash_verify 结果。"
|
||||
),
|
||||
category="shipping",
|
||||
params_schema=(
|
||||
{
|
||||
"key": "hash_sample_limit",
|
||||
"type": "number",
|
||||
"label": "哈希链抽样条数",
|
||||
"required": False,
|
||||
"default": 500,
|
||||
},
|
||||
{"key": "dry_run", "type": "boolean", "label": "仅演练(建议 true)", "required": False, "default": True},
|
||||
{"key": "limit", "type": "number", "label": "清理单批上限", "required": False, "default": 1},
|
||||
),
|
||||
defaults={"hash_sample_limit": 500, "dry_run": True, "limit": 1},
|
||||
))
|
||||
register_platform_job(PlatformJobDefinition(
|
||||
key="shipping-inventory-rpa",
|
||||
|
||||
Reference in new issue
Block a user