增加订单失败状态

This commit is contained in:
wuweihua
2026-10-14 16:50:11 +08:00
parent c1c5c6579c
commit c0c9c798b3
16 changed files with 455 additions and 28 deletions
@@ -0,0 +1,16 @@
-- prc_order_bill.billing_fail_status: 0 success / 1 product / 2 country / 3 weight
SET NAMES utf8mb4;
SET @col := (
SELECT COLUMN_NAME FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'prc_order_bill'
AND COLUMN_NAME = 'billing_fail_status'
LIMIT 1
);
SET @sql := IF(
@col IS NULL,
'ALTER TABLE prc_order_bill ADD COLUMN billing_fail_status tinyint NOT NULL DEFAULT 0 COMMENT ''计费失败状态:0成功/1未匹配产品/2未匹配国家/3未匹配重量段'' AFTER refund_status, ADD KEY idx_order_bill_billing_fail_status (billing_fail_status)',
'SELECT 1'
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;