Commit c920d3ec by deng-cc

fix:修复树形类型的代码生成的部分必要属性无法显示

parent ac5f45d1
......@@ -332,6 +332,17 @@ public class GenTableColumn extends BaseEntity
"parentName", "parentId", "orderNum", "ancestors");
}
public boolean isUsableColumn()
{
return isUsableColumn(javaField);
}
public static boolean isUsableColumn(String javaField)
{
//isSuperColumn()中的名单用于避免生成多余Domain属性,若某些属性在生成页面时需要用到不能忽略,则放在此处白名单
return StringUtils.equalsAnyIgnoreCase(javaField, "parentId" , "orderNum");
}
public String readConverterExp()
{
String remarks = StringUtils.substringBetween(this.columnComment, "(", ")");
......
......@@ -14,7 +14,8 @@
<form class="form-horizontal m" id="form-${businessName}-add">
#foreach($column in $columns)
#set($field=$column.javaField)
#if($column.insert && !$column.superColumn && !$column.pk)
#if($column.insert && !$column.pk)
#if(($column.usableColumn) || (!$column.superColumn))
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
......@@ -102,6 +103,7 @@
#end
#end
#end
#end
</form>
</div>
<th:block th:include="include :: footer" />
......
......@@ -14,7 +14,8 @@
<form class="form-horizontal m" id="form-${businessName}-edit" th:object="${${className}}">
<input name="${pkColumn.javaField}" th:field="*{${pkColumn.javaField}}" type="hidden">
#foreach($column in $columns)
#if($column.edit && !$column.superColumn && !$column.pk)
#if($column.edit && !$column.pk)
#if(($column.usableColumn) || (!$column.superColumn))
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
......@@ -102,6 +103,7 @@
#end
#end
#end
#end
</form>
</div>
<th:block th:include="include :: footer" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment