-- ============================================================ -- 中介黑名单字典数据脚本 -- 功能:创建个人和机构中介所需的字典数据 -- 作者:ruoyi -- 日期:2026-01-29 -- ============================================================ -- 设置客户端字符集为 utf8mb4 SET NAMES utf8mb4; SET CHARACTER SET utf8mb4; SET character_set_client = utf8mb4; SET character_set_connection = utf8mb4; SET character_set_results = utf8mb4; USE `discipline-prelim-check`; -- ============================================================ -- 人员类型字典(ccdi_person_type) -- ============================================================ -- 先删除旧数据(如果存在) DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_person_type'; DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_person_type'; -- 插入字典类型 INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark) VALUES ('人员类型', 'ccdi_person_type', '0', 'admin', NOW(), '中介黑名单-人员类型'); -- 插入字典数据 INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark) VALUES (1, '中介', '中介', 'ccdi_person_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (2, '职业背债人', '职业背债人', 'ccdi_person_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (3, '房产中介', '房产中介', 'ccdi_person_type', '', 'default', 'N', '0', 'admin', NOW(), NULL); -- ============================================================ -- 人员子类型字典(ccdi_person_sub_type) -- ============================================================ DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_person_sub_type'; DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_person_sub_type'; INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark) VALUES ('人员子类型', 'ccdi_person_sub_type', '0', 'admin', NOW(), '中介黑名单-人员子类型'); INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark) VALUES (1, '本人', '本人', 'ccdi_person_sub_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (2, '配偶', '配偶', 'ccdi_person_sub_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (3, '子女', '子女', 'ccdi_person_sub_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (9, '其他', '其他', 'ccdi_person_sub_type', '', 'default', 'N', '0', 'admin', NOW(), NULL); -- ============================================================ -- 性别字典(ccdi_indiv_gender)- 用于个人中介Excel下拉框 -- ============================================================ DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_indiv_gender'; DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_indiv_gender'; INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark) VALUES ('个人中介性别', 'ccdi_indiv_gender', '0', 'admin', NOW(), '中介黑名单-个人中介性别'); INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark) VALUES (1, '男', 'M', 'ccdi_indiv_gender', '', 'default', 'N', '0', 'admin', NOW(), NULL), (2, '女', 'F', 'ccdi_indiv_gender', '', 'default', 'N', '0', 'admin', NOW(), NULL), (3, '其他', 'O', 'ccdi_indiv_gender', '', 'default', 'N', '0', 'admin', NOW(), NULL); -- ============================================================ -- 证件类型字典(ccdi_certificate_type)- 用于个人中介Excel下拉框 -- ============================================================ DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_certificate_type'; DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_certificate_type'; INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark) VALUES ('证件类型', 'ccdi_certificate_type', '0', 'admin', NOW(), '中介黑名单-证件类型'); INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark) VALUES (1, '身份证', '身份证', 'ccdi_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (2, '护照', '护照', 'ccdi_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (3, '港澳通行证', '港澳通行证', 'ccdi_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (4, '台胞证', '台胞证', 'ccdi_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (5, '军官证', '军官证', 'ccdi_certificate_type', '', 'default', 'N', '0', 'admin', NOW(), NULL); -- ============================================================ -- 主体类型字典(ccdi_entity_type)- 用于机构中介Excel下拉框 -- ============================================================ DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_entity_type'; DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_entity_type'; INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark) VALUES ('主体类型', 'ccdi_entity_type', '0', 'admin', NOW(), '中介黑名单-主体类型'); INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark) VALUES (1, '有限责任公司', '有限责任公司', 'ccdi_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (2, '股份有限公司', '股份有限公司', 'ccdi_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (3, '合伙企业', '合伙企业', 'ccdi_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (4, '个体工商户', '个体工商户', 'ccdi_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL), (5, '外资企业', '外资企业', 'ccdi_entity_type', '', 'default', 'N', '0', 'admin', NOW(), NULL); -- ============================================================ -- 企业性质字典(ccdi_enterprise_nature)- 用于机构中介Excel下拉框 -- ============================================================ DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_enterprise_nature'; DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_enterprise_nature'; INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark) VALUES ('企业性质', 'ccdi_enterprise_nature', '0', 'admin', NOW(), '中介黑名单-企业性质'); INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark) VALUES (1, '国企', '国企', 'ccdi_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL), (2, '民企', '民企', 'ccdi_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL), (3, '外企', '外企', 'ccdi_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL), (4, '合资', '合资', 'ccdi_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL), (9, '其他', '其他', 'ccdi_enterprise_nature', '', 'default', 'N', '0', 'admin', NOW(), NULL); -- ============================================================ -- 数据来源字典(ccdi_data_source) -- ============================================================ DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_data_source'; DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_data_source'; INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark) VALUES ('数据来源', 'ccdi_data_source', '0', 'admin', NOW(), '中介黑名单-数据来源'); INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark) VALUES (1, '手动录入', 'MANUAL', 'ccdi_data_source', '', 'default', 'N', '0', 'admin', NOW(), NULL), (2, '系统同步', 'SYSTEM', 'ccdi_data_source', '', 'default', 'N', '0', 'admin', NOW(), NULL), (3, '批量导入', 'IMPORT', 'ccdi_data_source', '', 'default', 'N', '0', 'admin', NOW(), NULL), (4, '接口获取', 'API', 'ccdi_data_source', '', 'default', 'N', '0', 'admin', NOW(), NULL); -- ============================================================ -- 执行完成后操作说明 -- ============================================================ -- 1. 执行完成后,请通过系统管理 > 字典管理验证字典数据 -- 2. 重要:在每个字典类型页面点击"刷新缓存"按钮,确保字典数据加载到 Redis -- 3. 验证字典缓存是否生效(可通过测试模板下载确认下拉框是否显示) -- 4. 检查 Redis 缓存中的字典数据(sys_dict_cache:*)