From 38a9f6f7244d754e08621a3629f2897555dbe0eb Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Sun, 16 Aug 2026 14:59:57 +0800 Subject: [PATCH] feat(crm): add settlement method dict options migration Co-authored-by: Cursor --- ...20260816_crm_settlement_method_options.sql | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 backend/scripts/migrate_20260816_crm_settlement_method_options.sql diff --git a/backend/scripts/migrate_20260816_crm_settlement_method_options.sql b/backend/scripts/migrate_20260816_crm_settlement_method_options.sql new file mode 100644 index 000000000..1134557c0 --- /dev/null +++ b/backend/scripts/migrate_20260816_crm_settlement_method_options.sql @@ -0,0 +1,33 @@ +-- backend/scripts/migrate_20260816_crm_settlement_method_options.sql +-- 合同结算方式:按量结算 / 月结 / 季结 / 其他 +-- 可重复执行(幂等) + +INSERT INTO `sys_dict_data` ( + `id`, `dict_label`, `dict_value`, `tag_type`, `dict_type`, `tenant_no`, + `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, + `update_by`, `update_time`, `del_flag` +) VALUES +( + 'SXDC20260816SETTLE00000000000001', '按量结算', 'volume_settlement', '', + 'crm_settlement_method', 'shanxia2.0', 2, '', '1', '', NOW(), NULL, NOW(), 0 +), +( + 'SXDC20260816SETTLE00000000000002', '月结', 'monthly_settlement', '', + 'crm_settlement_method', 'shanxia2.0', 3, '', '1', '', NOW(), NULL, NOW(), 0 +), +( + 'SXDC20260816SETTLE00000000000003', '季结', 'quarterly_settlement', '', + 'crm_settlement_method', 'shanxia2.0', 4, '', '1', '', NOW(), NULL, NOW(), 0 +), +( + 'SXDC20260816SETTLE00000000000004', '其他', 'other_settlement', '', + 'crm_settlement_method', 'shanxia2.0', 5, '', '1', '', NOW(), NULL, NOW(), 0 +) +ON DUPLICATE KEY UPDATE + `dict_label` = VALUES(`dict_label`), + `dict_value` = VALUES(`dict_value`), + `dict_type` = VALUES(`dict_type`), + `tenant_no` = VALUES(`tenant_no`), + `order_num` = VALUES(`order_num`), + `del_flag` = 0, + `update_time` = NOW();