DELETE FROM sys_dict WHERE dict_type_id=(SELECT MAX(dict_type_id) FROM sys_dict_type WHERE dict_type_code='USERTYPE_DICT');

DELETE FROM sys_dict_type WHERE dict_type_code = 'usertype_dict';

INSERT INTO `sys_dict_type` (`DICT_TYPE_NAME`, `DICT_TYPE_CODE`, `DICT_TYPE_DISP_ORDER`, `DICT_TYPE_STATUS`, `DICT_TYPE_DESCRIPTION`, `CREATE_USER_ID`, `CREATE_TIME`, `UPDATE_USER_ID`, `UPDATE_TIME`) VALUES('用户类型','USERTYPE_DICT','7','Y','','1','2014-09-24 17:39:05','1','2014-09-24 17:39:05');

INSERT INTO sys_dict ( DICT_TYPE_ID, DICT_NAME, DICT_VALUE, DICT_DISP_ORDER, DICT_STATUS, DICT_DESCRIPTION, CREATE_USER_ID, CREATE_TIME, UPDATE_USER_ID, UPDATE_TIME) (SELECT (SELECT MAX(dict_type_id) FROM sys_dict_type WHERE dict_type_code='USERTYPE_DICT'),'系统管理员','0','99','Y','','1',NOW(),'1',NOW() FROM DUAL);
INSERT INTO sys_dict ( DICT_TYPE_ID, DICT_NAME, DICT_VALUE, DICT_DISP_ORDER, DICT_STATUS, DICT_DESCRIPTION, CREATE_USER_ID, CREATE_TIME, UPDATE_USER_ID, UPDATE_TIME) (SELECT (SELECT MAX(dict_type_id) FROM sys_dict_type WHERE dict_type_code='USERTYPE_DICT'),'工作用户(工作用户账号)','1','1','Y','','1',NOW(),'1',NOW() FROM DUAL);
INSERT INTO sys_dict ( DICT_TYPE_ID, DICT_NAME, DICT_VALUE, DICT_DISP_ORDER, DICT_STATUS, DICT_DESCRIPTION, CREATE_USER_ID, CREATE_TIME, UPDATE_USER_ID, UPDATE_TIME) (SELECT (SELECT MAX(dict_type_id) FROM sys_dict_type WHERE dict_type_code='USERTYPE_DICT'),'普通注册用户(普通用户账号)','5','5','Y','','1',NOW(),'1',NOW() FROM DUAL);
INSERT INTO sys_dict ( DICT_TYPE_ID, DICT_NAME, DICT_VALUE, DICT_DISP_ORDER, DICT_STATUS, DICT_DESCRIPTION, CREATE_USER_ID, CREATE_TIME, UPDATE_USER_ID, UPDATE_TIME) (SELECT (SELECT MAX(dict_type_id) FROM sys_dict_type WHERE dict_type_code='USERTYPE_DICT'),'企业注册用户(企业用户账号)','4','4','Y','','1',NOW(),'1',NOW() FROM DUAL);
INSERT INTO sys_dict ( DICT_TYPE_ID, DICT_NAME, DICT_VALUE, DICT_DISP_ORDER, DICT_STATUS, DICT_DESCRIPTION, CREATE_USER_ID, CREATE_TIME, UPDATE_USER_ID, UPDATE_TIME) (SELECT (SELECT MAX(dict_type_id) FROM sys_dict_type WHERE dict_type_code='USERTYPE_DICT'),'会员用户(VIP用户账号)','2','2','Y','','1',NOW(),'1',NOW() FROM DUAL);
INSERT INTO sys_dict ( DICT_TYPE_ID, DICT_NAME, DICT_VALUE, DICT_DISP_ORDER, DICT_STATUS, DICT_DESCRIPTION, CREATE_USER_ID, CREATE_TIME, UPDATE_USER_ID, UPDATE_TIME) (SELECT (SELECT MAX(dict_type_id) FROM sys_dict_type WHERE dict_type_code='USERTYPE_DICT'),'合作单位用户(高级用户账号)','3','3','Y','','1',NOW(),'1',NOW() FROM DUAL);

