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
1ae0694d
Commit
1ae0694d
authored
May 09, 2024
by
chenyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/05/09_API文档后台管理开发
parent
a7f6e0ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
ApiCustomParamsBiz.java
...om/upyuns/platform/rs/website/biz/ApiCustomParamsBiz.java
+8
-10
No files found.
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ApiCustomParamsBiz.java
View file @
1ae0694d
...
...
@@ -68,18 +68,16 @@ public class ApiCustomParamsBiz extends BaseBiz<ApiCustomParamsMapper, ApiCustom
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
EXIST_CODE
,
"API节点下已存在自定义参数"
);
}
}
if
(
apiCustomParams
.
getId
()
!=
null
)
{
Example
exampleParams
=
new
Example
(
ApiCustomParams
.
class
);
exampleParams
.
createCriteria
()
.
andEqualTo
(
"docId"
,
apiCustomParams
.
getDocId
())
.
andEqualTo
(
"nodeId"
,
apiCustomParams
.
getNodeId
());
ApiCustomParams
old
=
mapper
.
selectOneByExample
(
exampleParams
);
if
(
old
==
null
||
old
.
getIsDel
()
==
1
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
NOTEXIST_CODE
));
}
Example
exampleParams
=
new
Example
(
ApiCustomParams
.
class
);
exampleParams
.
createCriteria
()
.
andEqualTo
(
"docId"
,
apiCustomParams
.
getDocId
())
.
andEqualTo
(
"nodeId"
,
apiCustomParams
.
getNodeId
())
.
andEqualTo
(
"isDel"
,
0
);
ApiCustomParams
old
=
mapper
.
selectOneByExample
(
exampleParams
);
if
(
old
!=
null
)
{
BeanUtil
.
copyProperties
(
apiCustomParams
,
old
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
updateSelectiveByIdRe
(
old
);
}
else
{
}
else
{
insertSelectiveRe
(
apiCustomParams
);
}
return
ObjectRestResponse
.
succ
();
...
...
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