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
a7f6e0ab
Commit
a7f6e0ab
authored
May 09, 2024
by
chenyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/05/09_API文档后台管理开发
parent
fcf9ad42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
ApiCustomParamsBiz.java
...om/upyuns/platform/rs/website/biz/ApiCustomParamsBiz.java
+13
-1
ApiCustomParamsController.java
...form/rs/website/controller/ApiCustomParamsController.java
+2
-1
No files found.
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ApiCustomParamsBiz.java
View file @
a7f6e0ab
...
...
@@ -69,7 +69,11 @@ public class ApiCustomParamsBiz extends BaseBiz<ApiCustomParamsMapper, ApiCustom
}
}
if
(
apiCustomParams
.
getId
()
!=
null
)
{
ApiCustomParams
old
=
selectById
(
apiCustomParams
.
getId
());
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
));
}
...
...
@@ -86,6 +90,14 @@ public class ApiCustomParamsBiz extends BaseBiz<ApiCustomParamsMapper, ApiCustom
PageDataVO
<
ApiCustomParams
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectList
(
query
.
getSuper
()));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
public
ObjectRestResponse
getByNodeId
(
Integer
id
)
{
Example
exampleParams
=
new
Example
(
ApiCustomParams
.
class
);
exampleParams
.
createCriteria
()
.
andEqualTo
(
"isDel"
,
0
)
.
andEqualTo
(
"nodeId"
,
id
);
return
ObjectRestResponse
.
succ
(
mapper
.
selectOneByExample
(
exampleParams
));
}
}
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/ApiCustomParamsController.java
View file @
a7f6e0ab
...
...
@@ -14,6 +14,7 @@ import com.upyuns.platform.rs.website.entity.ApiCustomParams;
import
com.upyuns.platform.rs.website.mapper.ApiCustomParamsMapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.*
;
import
tk.mybatis.mapper.entity.Example
;
/**
*
...
...
@@ -38,7 +39,7 @@ public class ApiCustomParamsController extends BaseController<ApiCustomParamsBiz
@GetMapping
(
value
=
"/detail"
)
public
ObjectRestResponse
detail
(
Integer
id
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectById
(
id
)
);
return
baseBiz
.
getByNodeId
(
id
);
}
...
...
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