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
d750eed8
Commit
d750eed8
authored
Jan 27, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
cd138596
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
94 deletions
+113
-94
DmpNavigationTreeController.java
...z/dmp/modules/controller/DmpNavigationTreeController.java
+109
-92
DmpNavigationTreeServiceImpl.java
...mp/modules/service/impl/DmpNavigationTreeServiceImpl.java
+4
-2
No files found.
src/main/java/com/jz/dmp/modules/controller/DmpNavigationTreeController.java
View file @
d750eed8
...
@@ -51,13 +51,15 @@ public class DmpNavigationTreeController {
...
@@ -51,13 +51,15 @@ public class DmpNavigationTreeController {
return
this
.
dmpNavigationTreeService
.
queryById
(
id
);
return
this
.
dmpNavigationTreeService
.
queryById
(
id
);
}
}
/**列表查询DMP资源导航树
/**
* 列表查询DMP资源导航树
*
* @param dmpNavigationTreeRequest
* @param dmpNavigationTreeRequest
* @return
* @return
*/
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findList"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findList"
)
@ApiOperation
(
value
=
"列表查询DMP资源导航树"
,
notes
=
"列表查询DMP资源导航树"
)
@ApiOperation
(
value
=
"列表查询DMP资源导航树"
,
notes
=
"列表查询DMP资源导航树"
)
public
BaseBeanResponse
<
DmpNavigationTreeDto
>
findList
(
@RequestBody
DmpNavigationTreeRequest
dmpNavigationTreeRequest
,
HttpServletRequest
httpRequest
)
{
public
BaseBeanResponse
<
DmpNavigationTreeDto
>
findList
(
@RequestBody
DmpNavigationTreeRequest
dmpNavigationTreeRequest
,
HttpServletRequest
httpRequest
)
{
BaseBeanResponse
<
DmpNavigationTreeDto
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpNavigationTreeDto
>();
BaseBeanResponse
<
DmpNavigationTreeDto
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpNavigationTreeDto
>();
try
{
try
{
baseBeanResponse
=
dmpNavigationTreeService
.
findList
(
dmpNavigationTreeRequest
,
httpRequest
);
baseBeanResponse
=
dmpNavigationTreeService
.
findList
(
dmpNavigationTreeRequest
,
httpRequest
);
...
@@ -70,14 +72,25 @@ public class DmpNavigationTreeController {
...
@@ -70,14 +72,25 @@ public class DmpNavigationTreeController {
return
baseBeanResponse
;
return
baseBeanResponse
;
}
}
/**新增DMP资源导航树
/**
* 新增DMP资源导航树
*
* @param dmpNavigationTreeRequest
* @param dmpNavigationTreeRequest
* @return
* @return
*/
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@ApiOperation
(
value
=
"新增DMP资源导航树"
,
notes
=
"新增DMP资源导航树"
)
@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
>();
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
{
try
{
DmpNavigationTree
dmpNavigationTreeDb
=
dmpNavigationTreeService
.
insert
(
dmpNavigationTree
);
DmpNavigationTree
dmpNavigationTreeDb
=
dmpNavigationTreeService
.
insert
(
dmpNavigationTree
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
...
@@ -92,7 +105,9 @@ public class DmpNavigationTreeController {
...
@@ -92,7 +105,9 @@ public class DmpNavigationTreeController {
return
baseBeanResponse
;
return
baseBeanResponse
;
}
}
/**删除DMP资源导航树
/**
* 删除DMP资源导航树
*
* @param id
* @param id
* @return
* @return
*/
*/
...
@@ -100,7 +115,7 @@ public class DmpNavigationTreeController {
...
@@ -100,7 +115,7 @@ public class DmpNavigationTreeController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/deleteById"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/deleteById"
)
@ApiOperation
(
value
=
"删除DMP资源导航树"
,
notes
=
"删除DMP资源导航树"
)
@ApiOperation
(
value
=
"删除DMP资源导航树"
,
notes
=
"删除DMP资源导航树"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"DMP资源导航树主键"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"DMP资源导航树主键"
)
public
BaseResponse
deleteById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
Integer
id
,
HttpServletRequest
httpRequest
)
{
public
BaseResponse
deleteById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
Integer
id
,
HttpServletRequest
httpRequest
)
{
BaseResponse
baseResponse
=
new
BaseResponse
();
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
try
{
boolean
flag
=
dmpNavigationTreeService
.
deleteById
(
id
);
boolean
flag
=
dmpNavigationTreeService
.
deleteById
(
id
);
...
@@ -120,14 +135,16 @@ public class DmpNavigationTreeController {
...
@@ -120,14 +135,16 @@ public class DmpNavigationTreeController {
return
baseResponse
;
return
baseResponse
;
}
}
/**修改DMP资源导航树
/**
* 修改DMP资源导航树
*
* @param dmpNavigationTreeRequest
* @param dmpNavigationTreeRequest
* @return
* @return
*/
*/
@MethodCallLogPrint
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@ApiOperation
(
value
=
"修改DMP资源导航树"
,
notes
=
"修改DMP资源导航树"
)
@ApiOperation
(
value
=
"修改DMP资源导航树"
,
notes
=
"修改DMP资源导航树"
)
public
BaseBeanResponse
<
DmpNavigationTree
>
edit
(
@RequestBody
DmpNavigationTree
dmpNavigationTree
,
HttpServletRequest
httpRequest
)
{
public
BaseBeanResponse
<
DmpNavigationTree
>
edit
(
@RequestBody
DmpNavigationTree
dmpNavigationTree
,
HttpServletRequest
httpRequest
)
{
BaseBeanResponse
<
DmpNavigationTree
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpNavigationTree
>();
BaseBeanResponse
<
DmpNavigationTree
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpNavigationTree
>();
try
{
try
{
DmpNavigationTree
dmpNavigationTreeDb
=
dmpNavigationTreeService
.
update
(
dmpNavigationTree
);
DmpNavigationTree
dmpNavigationTreeDb
=
dmpNavigationTreeService
.
update
(
dmpNavigationTree
);
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpNavigationTreeServiceImpl.java
View file @
d750eed8
...
@@ -165,7 +165,9 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi
...
@@ -165,7 +165,9 @@ public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavi
List
<
DmpNavigationTreeDto
>
dtos
=
MyDmpNavigationTreeConverter
.
INSTANCE
().
domain2dto
(
list
);
List
<
DmpNavigationTreeDto
>
dtos
=
MyDmpNavigationTreeConverter
.
INSTANCE
().
domain2dto
(
list
);
if
(
dmpNavigationTreeRequest
.
getParentId
()!=
null
){
dtos
=
dmpArrangeTree
(
dmpNavigationTreeRequest
.
getParentId
(),
dtos
);
dtos
=
dmpArrangeTree
(
dmpNavigationTreeRequest
.
getParentId
(),
dtos
);
}
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setCode
(
StatuConstant
.
SUCCESS_CODE
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setMessage
(
"查询成功"
);
...
...
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