Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
6ba8ad14
Commit
6ba8ad14
authored
May 04, 2024
by
chenyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/05/04_API文档接口修改
parent
094b61fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
ApiDocBiz.java
...in/java/com/upyuns/platform/rs/website/biz/ApiDocBiz.java
+23
-22
No files found.
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ApiDocBiz.java
View file @
6ba8ad14
...
@@ -26,12 +26,13 @@ import javax.annotation.Resource;
...
@@ -26,12 +26,13 @@ import javax.annotation.Resource;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
/**
*
*
*/
*/
@Service
@Service
public
class
ApiDocBiz
extends
BaseBiz
<
ApiDocMapper
,
ApiDoc
>{
public
class
ApiDocBiz
extends
BaseBiz
<
ApiDocMapper
,
ApiDoc
>
{
@Resource
@Resource
...
@@ -47,35 +48,35 @@ public class ApiDocBiz extends BaseBiz<ApiDocMapper, ApiDoc>{
...
@@ -47,35 +48,35 @@ public class ApiDocBiz extends BaseBiz<ApiDocMapper, ApiDoc>{
Example
exampleParams
=
new
Example
(
ApiCustomParams
.
class
);
Example
exampleParams
=
new
Example
(
ApiCustomParams
.
class
);
List
<
ApiDocTreeVo
>
docTreeVoList
=
mapper
.
selectList
(
query
.
getSuper
());
List
<
ApiDocTreeVo
>
docTreeVoList
=
mapper
.
selectList
(
query
.
getSuper
());
for
(
ApiDocTreeVo
apiDocTreeVo
:
docTreeVoList
)
{
for
(
ApiDocTreeVo
apiDocTreeVo
:
docTreeVoList
)
{
if
(
StringUtils
.
isNotBlank
(
apiDocDTO
.
getKeyWord
())){
exampleNode
.
clear
();
if
(
StringUtils
.
isNotBlank
(
apiDocDTO
.
getKeyWord
()))
{
exampleNode
.
createCriteria
()
exampleNode
.
createCriteria
()
.
andEqualTo
(
"isDel"
,
0
)
.
andEqualTo
(
"isDel"
,
0
)
.
andLike
(
"nodeName"
,
'%'
+
apiDocDTO
.
getKeyWord
()+
'%'
)
.
andLike
(
"nodeName"
,
'%'
+
apiDocDTO
.
getKeyWord
()
+
'%'
)
.
andEqualTo
(
"docId"
,
apiDocTreeVo
.
getId
());
.
andEqualTo
(
"docId"
,
apiDocTreeVo
.
getId
());
}
else
{
}
else
{
exampleNode
.
createCriteria
()
exampleNode
.
createCriteria
()
.
andEqualTo
(
"isDel"
,
0
)
.
andEqualTo
(
"isDel"
,
0
)
.
andEqualTo
(
"docId"
,
apiDocTreeVo
.
getId
());
.
andEqualTo
(
"docId"
,
apiDocTreeVo
.
getId
());
}
}
exampleNode
.
excludeProperties
(
"respondJson"
);
exampleNode
.
excludeProperties
(
"respondJson"
);
List
<
ApiCustomNodeVo
>
nodeVos
=
new
ArrayList
<>();
List
<
ApiCustomNodeVo
>
nodeVos
=
nodeMapper
.
selectByExample
(
exampleNode
).
stream
().
map
(
apiCustomNode
->
{
for
(
ApiCustomNode
node
:
nodeMapper
.
selectByExample
(
exampleNode
))
{
ApiCustomNodeVo
nodeVoss
=
new
ApiCustomNodeVo
();
BeanUtils
.
copyProperties
(
apiCustomNode
,
nodeVoss
);
exampleParams
.
clear
();
exampleParams
.
createCriteria
()
exampleParams
.
createCriteria
()
.
andEqualTo
(
"nodeId"
,
n
ode
.
getId
())
.
andEqualTo
(
"nodeId"
,
apiCustomN
ode
.
getId
())
.
andEqualTo
(
"isDel"
,
0
)
.
andEqualTo
(
"isDel"
,
0
)
.
andEqualTo
(
"docId"
,
apiDocTreeVo
.
getId
());
.
andEqualTo
(
"docId"
,
apiDocTreeVo
.
getId
());
ApiCustomParams
params
=
paramsMapper
.
selectOneByExample
(
exampleParams
);
ApiCustomParams
params
=
paramsMapper
.
selectOneByExample
(
exampleParams
);
if
(
Objects
.
isNull
(
params
)){
if
(
Objects
.
isNull
(
params
))
{
continue
;
return
nodeVoss
;
}
}
ApiCustomNodeVo
vo
=
new
ApiCustomNodeVo
();
nodeVoss
.
setMethod
(
params
.
getMethod
());
BeanUtils
.
copyProperties
(
node
,
vo
);
return
nodeVoss
;
vo
.
setMethod
(
params
.
getMethod
());
}).
collect
(
Collectors
.
toList
());
nodeVos
.
add
(
vo
);
apiDocTreeVo
.
setApiCount
(
nodeVos
.
size
());
exampleParams
.
clear
();
}
apiDocTreeVo
.
setNodeVoList
(
nodeVos
);
apiDocTreeVo
.
setNodeVoList
(
nodeVos
);
exampleNode
.
clear
();
}
}
return
ObjectRestResponse
.
succ
(
docTreeVoList
);
return
ObjectRestResponse
.
succ
(
docTreeVoList
);
}
}
...
...
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