-- 招聘信息维护：招聘类型字典
-- 用于招聘信息导入模板“招聘类型”列下拉框

INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
SELECT '招聘类型', 'ccdi_recruit_type', '0', 'admin', NOW(), '招聘信息-招聘类型'
WHERE NOT EXISTS (
    SELECT 1 FROM sys_dict_type WHERE dict_type = 'ccdi_recruit_type'
);

UPDATE sys_dict_type
SET dict_name = '招聘类型',
    status = '0',
    update_by = 'admin',
    update_time = NOW(),
    remark = '招聘信息-招聘类型'
WHERE dict_type = 'ccdi_recruit_type';

DELETE FROM sys_dict_data WHERE dict_type = 'ccdi_recruit_type';

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, '社招', 'SOCIAL', 'ccdi_recruit_type', '', 'success', 'Y', '0', 'admin', NOW(), '社会招聘'),
(2, '校招', 'CAMPUS', 'ccdi_recruit_type', '', 'info', 'N', '0', 'admin', NOW(), '校园招聘');

-- 执行完成后需刷新字典缓存，确保模板下拉框立即生效。
