Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
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
姚本章
jz-dmp-service
Commits
2bc8399b
Commit
2bc8399b
authored
Jan 27, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校验树名称不能重复
parent
c34bf441
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
DmpNavigationTreeController.java
...z/dmp/modules/controller/DmpNavigationTreeController.java
+12
-1
No files found.
src/main/java/com/jz/dmp/modules/controller/DmpNavigationTreeController.java
View file @
2bc8399b
...
...
@@ -76,8 +76,19 @@ public class DmpNavigationTreeController {
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@ApiOperation
(
value
=
"新增DMP资源导航树"
,
notes
=
"新增DMP资源导航树"
)
public
BaseBeanResponse
<
DmpNavigationTree
>
add
(
@RequestBody
DmpNavigationTree
dmpNavigationTree
,
HttpServletRequest
httpRequest
){
public
BaseBeanResponse
<
DmpNavigationTree
>
add
(
@RequestBody
DmpNavigationTree
dmpNavigationTree
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpNavigationTree
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpNavigationTree
>();
//树名称去重
DmpNavigationTreeRequest
dmpNavigationTreeRequest
=
new
DmpNavigationTreeRequest
();
dmpNavigationTreeRequest
.
setName
(
dmpNavigationTree
.
getName
());
BaseBeanResponse
<
DmpNavigationTreeDto
>
baseBeanResponseRe
=
dmpNavigationTreeService
.
findList
(
dmpNavigationTreeRequest
,
httpRequest
);
if
(
baseBeanResponseRe
.
getDatas
()!=
null
&&
baseBeanResponseRe
.
getDatas
().
size
()>
0
)
{
baseBeanResponse
.
setCode
(
StatuConstant
.
CODE_ERROR_PARAMETER
);
baseBeanResponse
.
setMessage
(
"树名称不能重复"
);
return
baseBeanResponse
;
}
try
{
DmpNavigationTree
dmpNavigationTreeDb
=
dmpNavigationTreeService
.
insert
(
dmpNavigationTree
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
...
...
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