fix(线上代发价格): 店铺单号按字符串查聚水潭订单,修复订单关联走全表扫描 #868

Merged
limeng merged 1 commits from feature/limeng-online-daifa-soid-index into main 2026-11-04 17:28:57 +08:00
Collaborator

纯数字店铺单号作数组键被 PHP 转成 int,绑定到 varchar 的 so_id 上触发隐式类型转换、索引失效:
淘系订单表(500 万行)一次 IN 查询 118 秒,100 行订单关联 151 秒,页面和成本核查预计算都卡死。
loadJstOrders 统一把 so_id 转成字符串再查。
涉及:只读查询;不涉及迁移、权限和上游写入。

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01VANWYsNUbu2piMtCKymoyd

验证:相关单元/功能测试已在最新 main 上通过(发布脚本自动执行)。

🤖 Generated with Claude Code

纯数字店铺单号作数组键被 PHP 转成 int,绑定到 varchar 的 so_id 上触发隐式类型转换、索引失效: 淘系订单表(500 万行)一次 IN 查询 118 秒,100 行订单关联 151 秒,页面和成本核查预计算都卡死。 loadJstOrders 统一把 so_id 转成字符串再查。 涉及:只读查询;不涉及迁移、权限和上游写入。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VANWYsNUbu2piMtCKymoyd 验证:相关单元/功能测试已在最新 main 上通过(发布脚本自动执行)。 🤖 Generated with [Claude Code](https://claude.com/claude-code)
limeng added 1 commit 2026-11-04 17:28:54 +08:00
纯数字店铺单号作数组键被 PHP 转成 int,绑定到 varchar 的 so_id 上触发隐式类型转换、索引失效:
淘系订单表(500 万行)一次 IN 查询 118 秒,100 行订单关联 151 秒,页面和成本核查预计算都卡死。
loadJstOrders 统一把 so_id 转成字符串再查。
涉及:只读查询;不涉及迁移、权限和上游写入。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VANWYsNUbu2piMtCKymoyd
limeng merged commit cf708b1131 into main 2026-11-04 17:28:57 +08:00
limeng deleted branch feature/limeng-online-daifa-soid-index 2026-11-04 17:28:57 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WuYongJie/CaiWuXiTong#868
No description provided.