Commit df7538df authored by 赵啸非's avatar 赵啸非

修复部分sqlXml生成缺陷

parent 86a18cdd
...@@ -62,13 +62,13 @@ public class ${ClassName}Controller extends BaseCRUDJsonBodyMappingController<${ ...@@ -62,13 +62,13 @@ public class ${ClassName}Controller extends BaseCRUDJsonBodyMappingController<${
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc(); String busiDesc = "查询" + this.getModuleDesc();
${pkColumn.javaType} id = query.get${pkColumn.javaField?cap_first}(); ${pkColumn.javaType} id = query.get${pkColumn.javaField?cap_first}();
int code=VALUE_RESULT_SUCCESS; int code=VALUE_RESULT_SUCCESS;
try { try {
Set<${pkColumn.javaType}> idSet = new HashSet<>(); Set<${pkColumn.javaType}> idSet = new HashSet<>();
idSet.add(query.get${pkColumn.javaField?cap_first}()); idSet.add(query.get${pkColumn.javaField?cap_first}());
List<${ClassName}Entity> collect = this.service.find(new ${ClassName}Query()).stream().map(item -> { List<${ClassName}Entity> collect = this.service.find(new ${ClassName}Query()).stream().map(item -> {
if(idSet.contains(item.getget${pkColumn.javaField?cap_first}())) return null; if(idSet.contains(item.get${pkColumn.javaField?cap_first}())) return null;
return item; return item;
}).filter(f -> f != null).collect(Collectors.toList()); }).filter(f -> f != null).collect(Collectors.toList());
model.put("result", collect); model.put("result", collect);
......
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