正在显示
3 个修改的文件
包含
14 行增加
和
1 行删除
| @@ -109,6 +109,9 @@ public class GenConstants | @@ -109,6 +109,9 @@ public class GenConstants | ||
| 109 | /** 模糊查询 */ | 109 | /** 模糊查询 */ |
| 110 | public static final String QUERY_LIKE = "LIKE"; | 110 | public static final String QUERY_LIKE = "LIKE"; |
| 111 | 111 | ||
| 112 | + /** 相等查询 */ | ||
| 113 | + public static final String QUERY_EQ = "EQ"; | ||
| 114 | + | ||
| 112 | /** 需要 */ | 115 | /** 需要 */ |
| 113 | public static final String REQUIRE = "1"; | 116 | public static final String REQUIRE = "1"; |
| 114 | } | 117 | } |
| @@ -304,8 +304,17 @@ public class GenTableServiceImpl implements IGenTableService | @@ -304,8 +304,17 @@ public class GenTableServiceImpl implements IGenTableService | ||
| 304 | column.setColumnId(prevColumn.getColumnId()); | 304 | column.setColumnId(prevColumn.getColumnId()); |
| 305 | if (column.isList()) | 305 | if (column.isList()) |
| 306 | { | 306 | { |
| 307 | - // 如果是列表,继续保留字典类型 | 307 | + // 如果是列表,继续保留查询方式/字典类型选项 |
| 308 | column.setDictType(prevColumn.getDictType()); | 308 | column.setDictType(prevColumn.getDictType()); |
| 309 | + column.setQueryType(prevColumn.getQueryType()); | ||
| 310 | + } | ||
| 311 | + if (StringUtils.isNotEmpty(prevColumn.getIsRequired()) && !column.isPk() | ||
| 312 | + && (column.isInsert() || column.isEdit()) | ||
| 313 | + && ((column.isUsableColumn()) || (!column.isSuperColumn()))) | ||
| 314 | + { | ||
| 315 | + // 如果是(新增/修改&非主键/非忽略及父属性),继续保留必填/显示类型选项 | ||
| 316 | + column.setIsRequired(prevColumn.getIsRequired()); | ||
| 317 | + column.setHtmlType(prevColumn.getHtmlType()); | ||
| 309 | } | 318 | } |
| 310 | genTableColumnMapper.updateGenTableColumn(column); | 319 | genTableColumnMapper.updateGenTableColumn(column); |
| 311 | } | 320 | } |
| @@ -42,6 +42,7 @@ public class GenUtils | @@ -42,6 +42,7 @@ public class GenUtils | ||
| 42 | column.setJavaField(StringUtils.toCamelCase(columnName)); | 42 | column.setJavaField(StringUtils.toCamelCase(columnName)); |
| 43 | // 设置默认类型 | 43 | // 设置默认类型 |
| 44 | column.setJavaType(GenConstants.TYPE_STRING); | 44 | column.setJavaType(GenConstants.TYPE_STRING); |
| 45 | + column.setQueryType(GenConstants.QUERY_EQ); | ||
| 45 | 46 | ||
| 46 | if (arraysContains(GenConstants.COLUMNTYPE_STR, dataType) || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType)) | 47 | if (arraysContains(GenConstants.COLUMNTYPE_STR, dataType) || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType)) |
| 47 | { | 48 | { |
-
请 注册 或 登录 后发表评论