新增数据迁移任务到定时任务白名单;优化默认收货时间范围逻辑

This commit is contained in:
wuweihua
2026-11-11 15:34:11 +08:00
parent f82d9c667f
commit 7869205afc
14 changed files with 1251 additions and 3 deletions
@@ -0,0 +1,21 @@
-- Backfill prc_order_bill.product_floor_code / product_floor from prc_order_bill_ext.
-- Run after order_bill_product_floor_alter.sql.
-- When ext has non-blank channel text, copy to bill (truncate to column length).
SET NAMES utf8mb4;
UPDATE prc_order_bill b
INNER JOIN prc_order_bill_ext e ON e.bill_id = b.bill_id
SET
b.product_floor_code = CASE
WHEN e.product_floor_code IS NOT NULL AND TRIM(e.product_floor_code) <> ''
THEN LEFT(TRIM(e.product_floor_code), 64)
ELSE b.product_floor_code
END,
b.product_floor = CASE
WHEN e.product_floor IS NOT NULL AND TRIM(e.product_floor) <> ''
THEN LEFT(TRIM(e.product_floor), 200)
ELSE b.product_floor
END
WHERE (e.product_floor_code IS NOT NULL AND TRIM(e.product_floor_code) <> '')
OR (e.product_floor IS NOT NULL AND TRIM(e.product_floor) <> '');