Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
appbuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
appbuild
Commits
324dbcfc
Commit
324dbcfc
authored
Aug 08, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分sqlXml生成缺陷
parent
2723e7f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
17 deletions
+6
-17
appbuild-manager/src/main/resources/template/java/entity-tree.java.ftl
...ger/src/main/resources/template/java/entity-tree.java.ftl
+6
-0
appbuild-manager/src/main/resources/template/java/service-tree.java.ftl
...er/src/main/resources/template/java/service-tree.java.ftl
+0
-9
appbuild-manager/src/main/resources/template/java/serviceImpl-tree.java.ftl
...rc/main/resources/template/java/serviceImpl-tree.java.ftl
+0
-8
No files found.
appbuild-manager/src/main/resources/template/java/entity-tree.java.ftl
View file @
324dbcfc
...
@@ -28,6 +28,11 @@ public class ${ClassName}TreeSelect implements Serializable {
...
@@ -28,6 +28,11 @@ public class ${ClassName}TreeSelect implements Serializable {
*/
*/
private
Long
id
;
private
Long
id
;
/**
*
父节点
ID
*/
private
Long
parentId
;
/**
/**
*
节点名称
*
节点名称
*/
*/
...
@@ -43,6 +48,7 @@ public class ${ClassName}TreeSelect implements Serializable {
...
@@ -43,6 +48,7 @@ public class ${ClassName}TreeSelect implements Serializable {
public
${
ClassName
}
TreeSelect
(${
ClassName
}
Entity
entity
)
{
public
${
ClassName
}
TreeSelect
(${
ClassName
}
Entity
entity
)
{
this
.
id
=
entity
.
get
${
pkColumn
.
javaField
?
cap_first
}();
this
.
id
=
entity
.
get
${
pkColumn
.
javaField
?
cap_first
}();
this
.
parentId
=
entity
.
get
${
treeParentCode
?
cap_first
}();
this
.
label
=
entity
.
get
${
treeName
?
cap_first
}();
this
.
label
=
entity
.
get
${
treeName
?
cap_first
}();
if
(
!ObjectUtils.isEmpty(entity.getChildren())){
if
(
!ObjectUtils.isEmpty(entity.getChildren())){
this
.
children
=
entity
.
getChildren
().
stream
().
map
(${
ClassName
}
TreeSelect
::
new
).
collect
(
Collectors
.
toList
());
this
.
children
=
entity
.
getChildren
().
stream
().
map
(${
ClassName
}
TreeSelect
::
new
).
collect
(
Collectors
.
toList
());
...
...
appbuild-manager/src/main/resources/template/java/service-tree.java.ftl
View file @
324dbcfc
...
@@ -33,15 +33,6 @@ public interface ${ClassName}Service extends ${Service}<${ClassName}Entity,${pkC
...
@@ -33,15 +33,6 @@ public interface ${ClassName}Service extends ${Service}<${ClassName}Entity,${pkC
boolean
hasChildBy
${
ClassName
}
Id
(
Long
${
ClassName
?
uncap_first
}
Id
);
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
});
/**
/**
*
构建前端所需要下拉树结构
*
构建前端所需要下拉树结构
*
*
...
...
appbuild-manager/src/main/resources/template/java/serviceImpl-tree.java.ftl
View file @
324dbcfc
...
@@ -131,11 +131,6 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
...
@@ -131,11 +131,6 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
return
list
.
size
()
>
0
?
true
:
false
;
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
@
Override
public
List
<${
ClassName
}
TreeSelect
>
build
${
ClassName
}
TreeSelect
(
List
<${
ClassName
}
Entity
>
list
)
{
public
List
<${
ClassName
}
TreeSelect
>
build
${
ClassName
}
TreeSelect
(
List
<${
ClassName
}
Entity
>
list
)
{
List
<${
ClassName
}
Entity
>
returnList
=
new
ArrayList
<>();
List
<${
ClassName
}
Entity
>
returnList
=
new
ArrayList
<>();
...
@@ -196,9 +191,6 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
...
@@ -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
)
List
<${
ClassName
}
TreeSelect
>
collect
=
this
.
find
(
new
${
ClassName
}
Query
().${
treeParentCode
}(
parentId
),
context
).
stream
().
map
(
item
->
new
${
ClassName
}
TreeSelect
(
item
)
).
collect
(
Collectors
.
toList
());
).
collect
(
Collectors
.
toList
());
if
(
parentId
==
0L
)
{
return
collect
;
}
return
collect
;
return
collect
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment