Pre Merge pull request !468 from 耿嘉祺/master

This commit is contained in:
耿嘉祺 2022-04-15 08:58:54 +00:00 committed by Gitee
commit 26c2313de2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 2 deletions

View File

@ -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",

View File

@ -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())