fix: 使用安全哈希生成日计划策略ID
This commit is contained in:
@@ -129,7 +129,7 @@ WHERE NOT EXISTS (SELECT 1 FROM system_dict_data WHERE dict_type='lms_daily_plan
|
|||||||
-- 为全部有效租户分别初始化备货、套管顺序策略。
|
-- 为全部有效租户分别初始化备货、套管顺序策略。
|
||||||
INSERT INTO lms_daily_plan_strategy
|
INSERT INTO lms_daily_plan_strategy
|
||||||
(strategy_id, strategy_type, strategy_mode, cursor_daily_plan_id, version, creator, create_time, updater, update_time, deleted, tenant_id)
|
(strategy_id, strategy_type, strategy_mode, cursor_daily_plan_id, version, creator, create_time, updater, update_time, deleted, tenant_id)
|
||||||
SELECT UUID_SHORT(),
|
SELECT CAST(CONV(SUBSTRING(SHA2(CONCAT('lms_daily_plan_strategy:', tenant.id, ':', strategy.strategy_type), 256), 1, 15), 16, 10) AS UNSIGNED),
|
||||||
strategy.strategy_type, 1, NULL, 0, '1', NOW(), '1', NOW(), b'0', tenant.id
|
strategy.strategy_type, 1, NULL, 0, '1', NOW(), '1', NOW(), b'0', tenant.id
|
||||||
FROM system_tenant tenant
|
FROM system_tenant tenant
|
||||||
CROSS JOIN (SELECT 1 strategy_type UNION ALL SELECT 2) strategy
|
CROSS JOIN (SELECT 1 strategy_type UNION ALL SELECT 2) strategy
|
||||||
|
|||||||
Reference in New Issue
Block a user