-- 赔付场景字典：一级 + 二级（同一字典，一级 item_value 无 __，二级为 一级code__序号）
-- 适用: MySQL
-- 执行后需刷新字典缓存或重新登录

START TRANSACTION;

DELETE FROM sys_dict_item WHERE dict_id IN (SELECT id FROM sys_dict WHERE dict_code = 'pay_scene');
DELETE FROM sys_dict WHERE dict_code = 'pay_scene';

INSERT INTO sys_dict (id, dict_name, dict_code, description, del_flag, create_by, create_time, update_by, update_time, type)
VALUES ('PAY_SCENE_DICT_0001', '赔付场景', 'pay_scene', '赔付场景一级二级分类', 0, 'admin', NOW(), NULL, NULL, 0);

-- 一级 9 条（item_value 不含 __）
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L1_01', 'PAY_SCENE_DICT_0001', '业务规则费用争议', 'business_rule', NULL, 1, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L1_02', 'PAY_SCENE_DICT_0001', '影响客户感知或使用', 'customer_perception', NULL, 2, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L1_03', 'PAY_SCENE_DICT_0001', '营销活动规则', 'marketing_rule', NULL, 3, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L1_04', 'PAY_SCENE_DICT_0001', '流量费用争议', 'flow_fee', NULL, 4, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L1_05', 'PAY_SCENE_DICT_0001', '增值业务订购费用争议', 'value_add', NULL, 5, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L1_06', 'PAY_SCENE_DICT_0001', '渠道服务质量', 'channel_quality', NULL, 6, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L1_07', 'PAY_SCENE_DICT_0001', '网络质量', 'network_quality', NULL, 7, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L1_08', 'PAY_SCENE_DICT_0001', '防汛救灾', 'flood_relief', NULL, 8, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L1_09', 'PAY_SCENE_DICT_0001', '其它', 'other', NULL, 9, 1, 'admin', NOW(), NULL, NULL);

-- 二级：business_rule
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_BR_01', 'PAY_SCENE_DICT_0001', '已定购的业务未使用(包括销号未使用等)', 'business_rule__01', NULL, 10, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_02', 'PAY_SCENE_DICT_0001', '合约到期后未提示变更套餐,仍收取原套餐费用', 'business_rule__02', NULL, 11, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_03', 'PAY_SCENE_DICT_0001', '关停期间套餐费用争议', 'business_rule__03', NULL, 12, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_04', 'PAY_SCENE_DICT_0001', '二次放号营销活动规则争议', 'business_rule__04', NULL, 13, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_05', 'PAY_SCENE_DICT_0001', '月底无法取消业务次月未使用要求减免', 'business_rule__05', NULL, 14, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_06', 'PAY_SCENE_DICT_0001', '语音超出套餐费用争议', 'business_rule__06', NULL, 15, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_07', 'PAY_SCENE_DICT_0001', 'wifi费用争议', 'business_rule__07', NULL, 16, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_08', 'PAY_SCENE_DICT_0001', '短信包争议-否认订购', 'business_rule__08', NULL, 17, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_09', 'PAY_SCENE_DICT_0001', '短信包争议-未使用', 'business_rule__09', NULL, 18, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_10', 'PAY_SCENE_DICT_0001', '短信包争议-重复订购', 'business_rule__10', NULL, 19, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_11', 'PAY_SCENE_DICT_0001', '国话、宽带及IPTV安装调试费', 'business_rule__11', NULL, 20, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_12', 'PAY_SCENE_DICT_0001', '国际湿游费用争议-流量', 'business_rule__12', NULL, 21, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_13', 'PAY_SCENE_DICT_0001', '国际湿游费用争议-流量包', 'business_rule__13', NULL, 22, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_14', 'PAY_SCENE_DICT_0001', '国际湿游费用争议-语音', 'business_rule__14', NULL, 23, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_15', 'PAY_SCENE_DICT_0001', '年付宽带转月付', 'business_rule__15', NULL, 24, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_16', 'PAY_SCENE_DICT_0001', '销户小额欠费赔付', 'business_rule__16', NULL, 25, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_17', 'PAY_SCENE_DICT_0001', '携号转网费用争议', 'business_rule__17', NULL, 26, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_18', 'PAY_SCENE_DICT_0001', 'IPTV、副卡等未纳入融合产品,导致出账', 'business_rule__18', NULL, 27, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_19', 'PAY_SCENE_DICT_0001', '信控停机提醒未下发或下发失败', 'business_rule__19', NULL, 28, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_20', 'PAY_SCENE_DICT_0001', '信控停机提醒-用户感和延迟', 'business_rule__20', NULL, 29, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_BR_21', 'PAY_SCENE_DICT_0001', '其它费用争议', 'business_rule__21', NULL, 30, 1, 'admin', NOW(), NULL, NULL);

-- 二级：customer_perception
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_CP_01', 'PAY_SCENE_DICT_0001', '满意度修复', 'customer_perception__01', NULL, 31, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CP_02', 'PAY_SCENE_DICT_0001', '其他(其它用户认为公司侧不完善,影响其感知的问题)', 'customer_perception__02', NULL, 32, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CP_03', 'PAY_SCENE_DICT_0001', '充值缴费未到账或延迟到账(常态下)', 'customer_perception__03', NULL, 33, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CP_04', 'PAY_SCENE_DICT_0001', '服务不到位引起用户不满', 'customer_perception__04', NULL, 34, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CP_05', 'PAY_SCENE_DICT_0001', '渠道服务不一致(包括查询、业务办理等)', 'customer_perception__05', NULL, 35, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CP_06', 'PAY_SCENE_DICT_0001', '停开机问题(如缴费不开机)', 'customer_perception__06', NULL, 36, 1, 'admin', NOW(), NULL, NULL);

-- 二级：marketing_rule
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_MR_01', 'PAY_SCENE_DICT_0001', '权益领取过期或未到账', 'marketing_rule__01', NULL, 37, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_MR_02', 'PAY_SCENE_DICT_0001', '活动返费未到帐', 'marketing_rule__02', NULL, 38, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_MR_03', 'PAY_SCENE_DICT_0001', '代理商返费未到帐', 'marketing_rule__03', NULL, 39, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_MR_04', 'PAY_SCENE_DICT_0001', '套餐/营销活动未开通或取消', 'marketing_rule__04', NULL, 40, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_MR_05', 'PAY_SCENE_DICT_0001', '营销宣传提示不到位或不一致', 'marketing_rule__05', NULL, 41, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_MR_06', 'PAY_SCENE_DICT_0001', '用户否认使用流量', 'marketing_rule__06', NULL, 42, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_MR_07', 'PAY_SCENE_DICT_0001', '定向流量未免流,导致出账', 'marketing_rule__07', NULL, 43, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_MR_08', 'PAY_SCENE_DICT_0001', '家中孩子老人使用', 'marketing_rule__08', NULL, 44, 1, 'admin', NOW(), NULL, NULL);

-- 二级：flow_fee
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_FF_01', 'PAY_SCENE_DICT_0001', '流量包订购争议-否认订购', 'flow_fee__01', NULL, 45, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_FF_02', 'PAY_SCENE_DICT_0001', '流量包订购争议-未使用', 'flow_fee__02', NULL, 46, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_FF_03', 'PAY_SCENE_DICT_0001', '流量包订购争议-重复订购', 'flow_fee__03', NULL, 47, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_FF_04', 'PAY_SCENE_DICT_0001', '流量未结转', 'flow_fee__04', NULL, 48, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_FF_05', 'PAY_SCENE_DICT_0001', '未配置流量提醒', 'flow_fee__05', NULL, 49, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_FF_06', 'PAY_SCENE_DICT_0001', '未下发或下发失败提醒短信', 'flow_fee__06', NULL, 50, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_FF_07', 'PAY_SCENE_DICT_0001', '用户否认接收提醒信息', 'flow_fee__07', NULL, 51, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_FF_08', 'PAY_SCENE_DICT_0001', '用户感知提醒短信延迟', 'flow_fee__08', NULL, 52, 1, 'admin', NOW(), NULL, NULL);

-- 二级：value_add
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_VA_01', 'PAY_SCENE_DICT_0001', '用户否认使用或订购-点播类', 'value_add__01', NULL, 53, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_VA_02', 'PAY_SCENE_DICT_0001', '用户否认使用或订购-订购类', 'value_add__02', NULL, 54, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_VA_03', 'PAY_SCENE_DICT_0001', '家中孩子老人使用-点播类', 'value_add__03', NULL, 55, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_VA_04', 'PAY_SCENE_DICT_0001', '家中孩子老人使用-订购类', 'value_add__04', NULL, 56, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_VA_05', 'PAY_SCENE_DICT_0001', '订购无法查询或不规范', 'value_add__05', NULL, 57, 1, 'admin', NOW(), NULL, NULL);

-- 二级：channel_quality
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_CQ_01', 'PAY_SCENE_DICT_0001', '业务受理人工差错', 'channel_quality__01', NULL, 58, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_02', 'PAY_SCENE_DICT_0001', '业务受理系统差错', 'channel_quality__02', NULL, 59, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_03', 'PAY_SCENE_DICT_0001', '业务介绍不全', 'channel_quality__03', NULL, 60, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_04', 'PAY_SCENE_DICT_0001', '传递错误信息', 'channel_quality__04', NULL, 61, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_05', 'PAY_SCENE_DICT_0001', '服务态度', 'channel_quality__05', NULL, 62, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_06', 'PAY_SCENE_DICT_0001', '流程执行差错', 'channel_quality__06', NULL, 63, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_07', 'PAY_SCENE_DICT_0001', '缺乏受理技巧', 'channel_quality__07', NULL, 64, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_08', 'PAY_SCENE_DICT_0001', '(装维)当当慢', 'channel_quality__08', NULL, 65, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_09', 'PAY_SCENE_DICT_0001', '传递错误信息(10000号渠道)', 'channel_quality__09', NULL, 66, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_10', 'PAY_SCENE_DICT_0001', '服务态度(10000号渠道)', 'channel_quality__10', NULL, 67, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_11', 'PAY_SCENE_DICT_0001', '流程执行差错(10000号渠道)', 'channel_quality__11', NULL, 68, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_12', 'PAY_SCENE_DICT_0001', '缺乏受理技巧(10000号渠道)', 'channel_quality__12', NULL, 69, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_13', 'PAY_SCENE_DICT_0001', '业务介绍不全(10000号渠道)', 'channel_quality__13', NULL, 70, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_14', 'PAY_SCENE_DICT_0001', '业务受理人工差错(10000号渠道)', 'channel_quality__14', NULL, 71, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_CQ_15', 'PAY_SCENE_DICT_0001', '业务受理系统差错(10000号渠道)', 'channel_quality__15', NULL, 72, 1, 'admin', NOW(), NULL, NULL);

-- 二级：network_quality
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_NQ_01', 'PAY_SCENE_DICT_0001', '临时断站或网络突发', 'network_quality__01', NULL, 73, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_NQ_02', 'PAY_SCENE_DICT_0001', '网络部门确认无法立即解决的网络问题', 'network_quality__02', NULL, 74, 1, 'admin', NOW(), NULL, NULL);

-- 二级：flood_relief
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_FR_01', 'PAY_SCENE_DICT_0001', '通信费用', 'flood_relief__01', NULL, 75, 1, 'admin', NOW(), NULL, NULL),
('PAY_SCENE_L2_FR_02', 'PAY_SCENE_DICT_0001', '卫星直连费用', 'flood_relief__02', NULL, 76, 1, 'admin', NOW(), NULL, NULL);

-- 二级：other
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, status, create_by, create_time, update_by, update_time) VALUES
('PAY_SCENE_L2_OT_01', 'PAY_SCENE_DICT_0001', '其他', 'other__01', NULL, 77, 1, 'admin', NOW(), NULL, NULL);

COMMIT;
