Files
ccdi/sql/dpc_intermediary_dict_data_20260129.sql

140 lines
8.5 KiB
MySQL
Raw Permalink Normal View History

2026-01-29 13:39:47 +08:00
-- ============================================================
-- 中介黑名单字典数据脚本
-- 功能:创建个人和机构中介所需的字典数据
-- 作者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`;
-- ============================================================
2026-01-30 14:15:21 +08:00
-- 人员类型字典ccdi_person_type
2026-01-29 13:39:47 +08:00
-- ============================================================
-- 先删除旧数据(如果存在)
2026-01-30 14:15:21 +08:00
DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_person_type';
DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_person_type';
2026-01-29 13:39:47 +08:00
-- 插入字典类型
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
2026-01-30 14:15:21 +08:00
VALUES ('人员类型', 'ccdi_person_type', '0', 'admin', NOW(), '中介黑名单-人员类型');
2026-01-29 13:39:47 +08:00
-- 插入字典数据
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
2026-01-30 14:15:21 +08:00
(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);
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
-- 人员子类型字典ccdi_person_sub_type
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_person_sub_type';
DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_person_sub_type';
2026-01-29 13:39:47 +08:00
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
2026-01-30 14:15:21 +08:00
VALUES ('人员子类型', 'ccdi_person_sub_type', '0', 'admin', NOW(), '中介黑名单-人员子类型');
2026-01-29 13:39:47 +08:00
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
2026-01-30 14:15:21 +08:00
(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);
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
-- 性别字典ccdi_indiv_gender- 用于个人中介Excel下拉框
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_indiv_gender';
DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_indiv_gender';
2026-01-29 13:39:47 +08:00
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
2026-01-30 14:15:21 +08:00
VALUES ('个人中介性别', 'ccdi_indiv_gender', '0', 'admin', NOW(), '中介黑名单-个人中介性别');
2026-01-29 13:39:47 +08:00
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
2026-01-30 14:15:21 +08:00
(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);
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
-- 证件类型字典ccdi_certificate_type- 用于个人中介Excel下拉框
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_certificate_type';
DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_certificate_type';
2026-01-29 13:39:47 +08:00
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
2026-01-30 14:15:21 +08:00
VALUES ('证件类型', 'ccdi_certificate_type', '0', 'admin', NOW(), '中介黑名单-证件类型');
2026-01-29 13:39:47 +08:00
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
2026-01-30 14:15:21 +08:00
(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);
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
-- 主体类型字典ccdi_entity_type- 用于机构中介Excel下拉框
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_entity_type';
DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_entity_type';
2026-01-29 13:39:47 +08:00
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
2026-01-30 14:15:21 +08:00
VALUES ('主体类型', 'ccdi_entity_type', '0', 'admin', NOW(), '中介黑名单-主体类型');
2026-01-29 13:39:47 +08:00
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
2026-01-30 14:15:21 +08:00
(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);
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
-- 企业性质字典ccdi_enterprise_nature- 用于机构中介Excel下拉框
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_enterprise_nature';
DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_enterprise_nature';
2026-01-29 13:39:47 +08:00
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
2026-01-30 14:15:21 +08:00
VALUES ('企业性质', 'ccdi_enterprise_nature', '0', 'admin', NOW(), '中介黑名单-企业性质');
2026-01-29 13:39:47 +08:00
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
2026-01-30 14:15:21 +08:00
(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);
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
-- 数据来源字典ccdi_data_source
2026-01-29 13:39:47 +08:00
-- ============================================================
2026-01-30 14:15:21 +08:00
DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_data_source';
DELETE FROM sys_dict_type WHERE dict_type = 'ccdi_data_source';
2026-01-29 13:39:47 +08:00
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
2026-01-30 14:15:21 +08:00
VALUES ('数据来源', 'ccdi_data_source', '0', 'admin', NOW(), '中介黑名单-数据来源');
2026-01-29 13:39:47 +08:00
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
2026-01-30 14:15:21 +08:00
(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);
2026-01-29 13:39:47 +08:00
-- ============================================================
-- 执行完成后操作说明
-- ============================================================
-- 1. 执行完成后,请通过系统管理 > 字典管理验证字典数据
-- 2. 重要:在每个字典类型页面点击"刷新缓存"按钮,确保字典数据加载到 Redis
-- 3. 验证字典缓存是否生效(可通过测试模板下载确认下拉框是否显示)
-- 4. 检查 Redis 缓存中的字典数据sys_dict_cache:*