From c622e46adc0a2dd07d91968c753dfe67c8ec1722 Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Tue, 5 May 2026 16:53:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(wx-security):=20Phase=202E=20AES=20+=20?= =?UTF-8?q?=E5=85=A8=20cleanup=20(PR=20#1669=20/=20Issue=20#1665)=20-=20fi?= =?UTF-8?q?nal=20phase,=20wx=20=E5=86=85=E5=AE=B9=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E5=85=A8=E9=93=BE=E8=B7=AF=E9=97=AD=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2026-05/05_feat_wx-security_phase2e.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 changelogs/2026-05/05_feat_wx-security_phase2e.md diff --git a/changelogs/2026-05/05_feat_wx-security_phase2e.md b/changelogs/2026-05/05_feat_wx-security_phase2e.md new file mode 100644 index 0000000..9752b11 --- /dev/null +++ b/changelogs/2026-05/05_feat_wx-security_phase2e.md @@ -0,0 +1,63 @@ +# feat(wx-security): Phase 2E AES 加密回调 + 全 cleanup (final) + +**PR**: [#1669](https://git.1814.love:8443/wx/HL/pulls/1669) **Issue**: [#1665](https://git.1814.love:8443/wx/HL/issues/1665) **合并**: 2026-05-05 + +wx 内容安全方案最后一个 Phase。AES 加密回调实现 + Phase 2A/2B 全部 P2 cleanup。 + +## AES 加密回调 + +新建 `WxBizMsgCryptUtil`(user-service.wx.util,与企微 WxCryptUtil 解耦)。`WxContentSecurityService.handleWebhook` AES 分支:验签 → 解密 XML → 解析 trace_id+suggest+label → 走和明文相同的 update + MQ。解密失败抛 BusinessException → GlobalExceptionHandler 转 200+JSON。 + +公众平台后台支持「明文模式」(Phase 1 默认) / 「兼容模式」 / 「安全模式」三种切换;nacos 配 `wechat.miniapp.webhook.encoding-aes-key` 真值后即可切 AES 模式。 + +## Phase 2A 6 P2 cleanup + +| # | 修复 | +|---|---| +| P2-1 | LIKE 性能 → TODO 注释 | +| P2-2 | WxSecurityFeignClient.batchTraceStatus 改 POST + DTO | +| P2-3 | UserFeedback extends BaseDO + V20260505_009 | +| P2-4 | Listener 三段事务设计 javadoc | +| P2-5 | WxAuditStatusResolver 50 batch 超限 log.warn | + +## Phase 2B 6 P2 cleanup + +| # | 修复 | +|---|---| +| P2-1 | reviewId @JsonFormat(STRING) + ToStringSerializer | +| P2-2 | SCENE_COMMENT 引枚举 | +| P2-3 | anonymousUserId 单测 | +| P2-4 | OPENID_FETCH_FAILED 错误码(551006)| +| P2-6 | alreadyHidden CAS 防并发再机审 | + +## schema 跨 service 同步 + +- order_complaint schema.sql 同步 +- refund_application / order_invoice order_service_v2_init.sql 同步 +- user_feedback sql/common_tables.sql 真相源同步 + +## 测试 + +- mvn compile 全工程 BUILD SUCCESS +- 173/173 全绿(user 112 + order 61) + +## 🎯 wx 内容安全方案全链路闭环 + +- Phase 1 #1659 基础设施 +- Phase 2A #1661 UGC 接入 + 公开列表 + MQ +- Phase 2B #1667 评价举报子系统 +- Phase 2C #1666 出行人三层兜底 +- Phase 2D #1668 admin 后台 + Phase 2C cleanup +- **Phase 2E #1669 AES 加密 + 全 cleanup** + +## 部署注意事项 + +- V20260505_009 在 hl_user_service schema +- nacos 配 `wechat.miniapp.webhook.encoding-aes-key` 真值后才能切兼容/安全模式 +- 微信公众平台后台仍可用明文模式(不强制升级) + +## 不在范围(后续工单) + +- Phase 2D-B 跨服务复审聚合 +- Phase 2D-C user_risk 规则实际应用 +- 站内信 SDK 集成