perf: 优化拼多多订单列表索引与查询,并放宽前端超时

This commit is contained in:
2026-09-02 23:03:01 +08:00
parent b0372c132c
commit aee9aac41a
5 changed files with 58 additions and 13 deletions
@@ -63,8 +63,10 @@ CREATE TABLE `channel_pdd_order` (
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_channel_pdd_order_company_sn`(`company_id` ASC, `order_sn` ASC) USING BTREE COMMENT '幂等键:同一公司订单号唯一;精确查单号',
INDEX `idx_channel_pdd_order_company_confirm`(`company_id` ASC, `confirm_time` ASC, `id` ASC) USING BTREE COMMENT '公司维度按成交时间分页',
INDEX `idx_channel_pdd_order_company_shop_confirm`(`company_id` ASC, `shop_id` ASC, `confirm_time` ASC, `id` ASC) USING BTREE COMMENT '店铺维度按成交时间分页',
INDEX `idx_channel_pdd_order_company_confirm`(`company_id` ASC, `confirm_time` ASC, `id` ASC) USING BTREE COMMENT '公司维度按成交时间分页(无状态筛选)',
INDEX `idx_channel_pdd_order_company_shop_confirm`(`company_id` ASC, `shop_id` ASC, `confirm_time` ASC, `id` ASC) USING BTREE COMMENT '店铺维度按成交时间分页(无状态筛选)',
INDEX `idx_channel_pdd_order_company_status_confirm`(`company_id` ASC, `order_status` ASC, `confirm_time` ASC, `id` ASC) USING BTREE COMMENT '公司+订单状态+成交时间(列表筛已签收等)',
INDEX `idx_channel_pdd_order_company_shop_status_confirm`(`company_id` ASC, `shop_id` ASC, `order_status` ASC, `confirm_time` ASC, `id` ASC) USING BTREE COMMENT '店铺+订单状态+成交时间',
INDEX `idx_channel_pdd_order_company_created`(`company_id` ASC, `created_time` ASC, `id` ASC) USING BTREE COMMENT '公司+下单时间',
INDEX `idx_channel_pdd_order_company_shop_created`(`company_id` ASC, `shop_id` ASC, `created_time` ASC, `id` ASC) USING BTREE COMMENT '店铺+下单时间',
INDEX `idx_channel_pdd_order_company_pay`(`company_id` ASC, `pay_time` ASC, `id` ASC) USING BTREE COMMENT '公司+支付时间',