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
52c20b14
Commit
52c20b14
authored
Aug 08, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分sqlXml生成缺陷
parent
87eae6d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
appbuild-manager/src/main/java/com/mortals/xhx/module/project/web/ProjectController.java
...com/mortals/xhx/module/project/web/ProjectController.java
+6
-2
appbuild-manager/src/main/resources/template/java/serviceImpl.java.ftl
...ger/src/main/resources/template/java/serviceImpl.java.ftl
+3
-3
No files found.
appbuild-manager/src/main/java/com/mortals/xhx/module/project/web/ProjectController.java
View file @
52c20b14
package
com.mortals.xhx.module.project.web
;
package
com.mortals.xhx.module.project.web
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.upload.service.UploadService
;
import
com.mortals.xhx.base.system.upload.service.UploadService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -23,8 +24,6 @@ import java.util.List;
...
@@ -23,8 +24,6 @@ import java.util.List;
@RequestMapping
(
"project"
)
@RequestMapping
(
"project"
)
public
class
ProjectController
extends
BaseCRUDJsonMappingController
<
ProjectService
,
ProjectForm
,
ProjectEntity
,
Long
>
{
public
class
ProjectController
extends
BaseCRUDJsonMappingController
<
ProjectService
,
ProjectForm
,
ProjectEntity
,
Long
>
{
@Autowired
private
ParamService
paramService
;
@Autowired
@Autowired
private
UploadService
uploadService
;
private
UploadService
uploadService
;
...
@@ -38,6 +37,11 @@ public class ProjectController extends BaseCRUDJsonMappingController<ProjectServ
...
@@ -38,6 +37,11 @@ public class ProjectController extends BaseCRUDJsonMappingController<ProjectServ
super
.
init
(
request
,
response
,
form
,
model
,
context
);
super
.
init
(
request
,
response
,
form
,
model
,
context
);
}
}
@Override
protected
void
doListBefore
(
HttpServletRequest
request
,
HttpServletResponse
response
,
ProjectForm
form
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
super
.
doListBefore
(
request
,
response
,
form
,
model
,
context
);
}
/**
/**
* 工程文件下载
* 工程文件下载
...
...
appbuild-manager/src/main/resources/template/java/serviceImpl.java.ftl
View file @
52c20b14
...
@@ -77,9 +77,9 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
...
@@ -77,9 +77,9 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
private
void
fillSubData
(
List
<${
ClassName
}
Entity
>
list
)
{
private
void
fillSubData
(
List
<${
ClassName
}
Entity
>
list
)
{
List
<${
pkColumn
.
javaType
}>
idList
=
list
.
stream
().
map
(
i
->
i
.
get
${
pkColumn
.
javaField
?
cap_first
}()).
collect
(
Collectors
.
toList
());
List
<${
pkColumn
.
javaType
}>
idList
=
list
.
stream
().
map
(
i
->
i
.
get
${
pkColumn
.
javaField
?
cap_first
}()).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
idList
))
return
;
if
(
ObjectUtils
.
isEmpty
(
idList
))
return
;
${
subClassName
}
Query
${
subclassName
}
Query
=
new
${
subClassName
}
Query
();
Map
<${
pkColumn
.
javaType
},
List
<${
subClassName
}
Entity
>>
${
subclassName
}
ListMap
=
${
subclassName
}
Service
${
subclassName
}
Query
.
set
${
subTableFkClassName
}
List
(
idList
);
.
find
(
new
${
subClassName
}
Query
().${
subTableFkClassName
}
List
(
idList
)).
parallelStream
()
Map
<${
pkColumn
.
javaType
},
List
<${
subClassName
}
Entity
>>
${
subclassName
}
ListMap
=
${
subclassName
}
Service
.
find
(${
subclassName
}
Query
).
stream
()
.
collect
(
Collectors
.
groupingBy
(${
subClassName
}
Entity
::
get
${
subTableFkClassName
}));
.
collect
(
Collectors
.
groupingBy
(${
subClassName
}
Entity
::
get
${
subTableFkClassName
}));
list
.
forEach
(
item
->
item
.
set
${
subClassName
}
List
(${
subclassName
}
ListMap
.
get
(
item
.
get
${
pkColumn
.
javaField
?
cap_first
}())));
list
.
forEach
(
item
->
item
.
set
${
subClassName
}
List
(${
subclassName
}
ListMap
.
get
(
item
.
get
${
pkColumn
.
javaField
?
cap_first
}())));
}
}
...
...
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