数据库转java实体
SELECT concat( '\n/**\n', ' * ', v.column_comment, '\n', ' */\n', 'private ', v.dataType, ' ', v.column_name, ';' ) resultData FROM ( SELECT CASE WHEN ( data_type = 'varchar' OR data_type = 'char' OR data_type = 'text' OR data_type = 'blob' ) THEN 'String' WHEN data_type = 'int' THEN 'int' WHEN data_type = 'bigint' THEN 'Long' WHEN data_type = 'double' THEN 'double' WHEN data_type = 'tinyint' THEN 'Boolean' WHEN data_type = 'datetime' THEN 'Date' END AS dataType, column_name, column_comment FROM information_schema. COLUMNS WHERE table_name = 'basicdata_negative_list' ) v