Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d1a1b786
authored
Sep 06, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
saas菜单配置
parent
466c8931
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
0 deletions
saas-module/src/main/java/com/makeit/controller/saas/SaasMenuController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasMenuController.java
0 → 100644
View file @
d1a1b786
package
com
.
makeit
.
controller
.
saas
;
import
com.makeit.common.dto.BaseIdDTO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.dto.saas.SaasMenuDTOVO
;
import
com.makeit.module.admin.dto.saas.SaasMenuQueryDTO
;
import
com.makeit.service.saas.SaasMenuService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* <p>
* 平台端菜单 前端控制器
* </p>
*
* @author eugene young
* @since 2022-05-10
*/
@Api
(
tags
=
"saas端-菜单"
)
@RestController
@RequestMapping
(
"/saas/menu"
)
public
class
SaasMenuController
{
@Autowired
private
SaasMenuService
platMenuService
;
@Action
(
module
=
"saas端-菜单"
,
name
=
"列表"
,
code
=
"plat:menu:list"
)
@ApiOperation
(
"列表"
)
@PostMapping
(
"list"
)
public
ApiResponseEntity
<
List
<
SaasMenuDTOVO
>>
list
(
@RequestBody
SaasMenuQueryDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platMenuService
.
list
(
dto
));
}
@Action
(
module
=
"saas端-菜单"
,
name
=
"树形列表"
,
code
=
"plat:menu:tree"
)
@ApiOperation
(
"树形列表"
)
@PostMapping
(
"tree"
)
public
ApiResponseEntity
<
List
<
SaasMenuDTOVO
>>
tree
(
@RequestBody
SaasMenuQueryDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platMenuService
.
tree
(
dto
));
}
@ApiOperation
(
"列表(AuthIgnore)"
)
@PostMapping
(
"listAuthIgnore"
)
public
ApiResponseEntity
<
List
<
SaasMenuDTOVO
>>
listAuthIgnore
(
@RequestBody
SaasMenuQueryDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platMenuService
.
list
(
dto
));
}
@ApiOperation
(
"树形列表(AuthIgnore)"
)
@PostMapping
(
"treeAuthIgnore"
)
public
ApiResponseEntity
<
List
<
SaasMenuDTOVO
>>
treeAuthIgnore
(
@RequestBody
SaasMenuQueryDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platMenuService
.
tree
(
dto
));
}
@Action
(
module
=
"saas端-菜单"
,
name
=
"新增"
,
code
=
"plat:menu:add"
)
@ApiOperation
(
"新增"
)
@PostMapping
(
"add"
)
public
ApiResponseEntity
<?>
add
(
@Validated
@RequestBody
SaasMenuDTOVO
dto
)
{
platMenuService
.
add
(
dto
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"saas端-菜单"
,
name
=
"编辑"
,
code
=
"plat:menu:edit"
)
@ApiOperation
(
"编辑"
)
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
SaasMenuDTOVO
dto
)
{
platMenuService
.
edit
(
dto
);
return
ApiResponseUtils
.
success
();
}
//@Action(module = "saas端-菜单", name = "详情", code = "plat:menu:view")
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
SaasMenuDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platMenuService
.
view
(
dto
.
getId
()));
}
@Action
(
module
=
"saas端-菜单"
,
name
=
"删除"
,
code
=
"plat:menu:del"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
)
{
platMenuService
.
del
(
dto
.
getId
());
return
ApiResponseUtils
.
success
();
}
@ApiOperation
(
"同步"
)
@PostMapping
(
"sync"
)
public
ApiResponseEntity
<?>
sync
()
{
platMenuService
.
sync
();
return
ApiResponseUtils
.
success
();
}
}
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