代码生成树表情况下非字符串类型的查询条件时脚本错误

This commit is contained in:
thinkgem
2019-12-01 00:06:05 +08:00
parent 6c112b9b49
commit 5467aa933d
2 changed files with 12 additions and 0 deletions

View File

@@ -91,9 +91,15 @@ public class ${ClassName}Controller extends BaseController {
}
<% for(c in table.columnList){ %>
<% if(c.isQuery == "1" && !c.isTreeEntityColumn && c.attrName != 'status'){ %>
<% if(c.attrType == 'String'){ %>
if (StringUtils.isNotBlank(${className}.${c.attrNameForGetMethod})){
${className}.setParentCode(null);
}
<% }else{ %>
if (${className}.${c.attrNameForGetMethod} != null){
${className}.setParentCode(null);
}
<% } %>
<% } %>
<% } %>
List<${ClassName}> list = ${className}Service.findList(${className});

View File

@@ -89,9 +89,15 @@ public class ${ClassName}Controller extends BaseController {
}
<% for(c in table.columnList){ %>
<% if(c.isQuery == "1" && !c.isTreeEntityColumn && c.attrName != 'status'){ %>
<% if(c.attrType == 'String'){ %>
if (StringUtils.isNotBlank(${className}.${c.attrNameForGetMethod})){
${className}.setParentCode(null);
}
<% }else{ %>
if (${className}.${c.attrNameForGetMethod} != null){
${className}.setParentCode(null);
}
<% } %>
<% } %>
<% } %>
List<${ClassName}> list = ${className}Service.findList(${className});