Commit 324dbcfc authored by 赵啸非's avatar 赵啸非

修复部分sqlXml生成缺陷

parent 2723e7f6
......@@ -28,6 +28,11 @@ public class ${ClassName}TreeSelect implements Serializable {
*/
private Long id;
/**
* 父节点ID
*/
private Long parentId;
/**
* 节点名称
*/
......@@ -43,6 +48,7 @@ public class ${ClassName}TreeSelect implements Serializable {
public ${ClassName}TreeSelect(${ClassName}Entity entity) {
this.id = entity.get${pkColumn.javaField?cap_first}();
this.parentId = entity.get${treeParentCode?cap_first}();
this.label = entity.get${treeName?cap_first}();
if(!ObjectUtils.isEmpty(entity.getChildren())){
this.children = entity.getChildren().stream().map(${ClassName}TreeSelect::new).collect(Collectors.toList());
......
......@@ -33,15 +33,6 @@ public interface ${ClassName}Service extends ${Service}<${ClassName}Entity,${pkC
boolean hasChildBy${ClassName}Id(Long ${ClassName?uncap_first}Id);
/**
* 查询${functionName}数据
*
* @param ${ClassName?uncap_first} ${functionName}
* @return ${functionName}集合
*/
List<${ClassName}Entity> select${ClassName}List(${ClassName}Entity ${ClassName?uncap_first});
/**
* 构建前端所需要下拉树结构
*
......
......@@ -131,11 +131,6 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
return list.size() > 0 ? true : false;
}
@Override
public List<${ClassName}Entity> select${ClassName}List(${ClassName}Entity ${ClassName?uncap_first}) {
return this.find(new ${ClassName}Query());
}
@Override
public List<${ClassName}TreeSelect> build${ClassName}TreeSelect(List<${ClassName}Entity> list) {
List<${ClassName}Entity> returnList = new ArrayList<>();
......@@ -196,9 +191,6 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
//只做一层
List<${ClassName}TreeSelect> collect = this.find(new ${ClassName}Query().${treeParentCode}(parentId), context).stream().map(item -> new ${ClassName}TreeSelect(item)
).collect(Collectors.toList());
if (parentId==0L) {
return collect;
}
return 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