同步数据库表时保留更多信息
1. 增加代码生成通用常量中的数据库时间类型datetime2(SQL Server) 2. 字段如果在列表中显示,增加保留显示类型选项
This commit is contained in:
		@@ -38,7 +38,7 @@ public class GenConstants
 | 
			
		||||
    public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };
 | 
			
		||||
 | 
			
		||||
    /** 数据库时间类型 */
 | 
			
		||||
    public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };
 | 
			
		||||
    public static final String[] COLUMNTYPE_TIME = { "datetime", "datetime2", "time", "date", "timestamp" };
 | 
			
		||||
 | 
			
		||||
    /** 数据库数字类型 */
 | 
			
		||||
    public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
 | 
			
		||||
 
 | 
			
		||||
@@ -304,9 +304,10 @@ public class GenTableServiceImpl implements IGenTableService
 | 
			
		||||
                column.setColumnId(prevColumn.getColumnId());
 | 
			
		||||
                if (column.isList())
 | 
			
		||||
                {
 | 
			
		||||
                    // 如果是列表,继续保留查询方式/字典类型选项
 | 
			
		||||
                    // 如果是列表,继续保留字典类型、查询方式、显示类型选项
 | 
			
		||||
                    column.setDictType(prevColumn.getDictType());
 | 
			
		||||
                    column.setQueryType(prevColumn.getQueryType());
 | 
			
		||||
                    column.setHtmlType(prevColumn.getHtmlType());
 | 
			
		||||
                }
 | 
			
		||||
                if (StringUtils.isNotEmpty(prevColumn.getIsRequired()) && !column.isPk()
 | 
			
		||||
                        && (column.isInsert() || column.isEdit())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user