修改套餐规则

This commit is contained in:
wuweihua
2026-10-28 18:10:10 +08:00
parent 2bd417b84e
commit 8ed7b3146b
21 changed files with 536 additions and 411 deletions
@@ -0,0 +1,13 @@
-- Soft-delete flag for price versions (catalog EFFECT soft-delete)
SET @db := DATABASE();
SET @sql := (
SELECT IF(COUNT(*) = 0,
'ALTER TABLE prc_price_set_version ADD COLUMN is_del char(1) NOT NULL DEFAULT ''0'' COMMENT ''是否删除 0未删除 1已删除'' AFTER price_build_mode, ADD KEY idx_psv_is_del (is_del)',
'SELECT 1')
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'prc_price_set_version' AND COLUMN_NAME = 'is_del'
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
UPDATE prc_price_set_version SET is_del = '0' WHERE is_del IS NULL OR is_del = '';