feat: 部门、字典、日志、菜单、角色、用户列表接口补充权限校验
新增校验:sys:dept:list、sys:dict:list、sys:dict-item:list、sys:log:list、sys:menu:list、sys:role:list、sys:user:list
This commit is contained in:
@@ -36,6 +36,7 @@ public class DeptController {
|
||||
|
||||
@Operation(summary = "部门列表")
|
||||
@GetMapping
|
||||
@PreAuthorize("@ss.hasPerm('sys:dept:list')")
|
||||
@Log(module = LogModuleEnum.DEPT, value = ActionTypeEnum.LIST)
|
||||
public Result<List<DeptVO>> getDeptList(
|
||||
@Valid DeptQuery queryParams
|
||||
|
||||
@@ -58,6 +58,7 @@ public class DictController {
|
||||
|
||||
@Operation(summary = "字典分页列表")
|
||||
@GetMapping
|
||||
@PreAuthorize("@ss.hasPerm('sys:dict:list')")
|
||||
@Log(module = LogModuleEnum.DICT, value = ActionTypeEnum.LIST)
|
||||
public PageResult<DictPageVO> getDictPage(
|
||||
@Valid DictQuery queryParams
|
||||
@@ -135,6 +136,7 @@ public class DictController {
|
||||
|
||||
@Operation(summary = "获取字典项分页列表")
|
||||
@GetMapping("/{dictCode}/items")
|
||||
@PreAuthorize("@ss.hasPerm('sys:dict-item:list')")
|
||||
public PageResult<DictItemPageVO> getDictItemsPage(
|
||||
@Parameter(description = "字典编码") @PathVariable String dictCode,
|
||||
@Valid DictItemQuery queryParams
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
@@ -36,6 +37,7 @@ public class LogController {
|
||||
|
||||
@Operation(summary = "日志分页列表")
|
||||
@GetMapping
|
||||
@PreAuthorize("@ss.hasPerm('sys:log:list')")
|
||||
@Log(module = LogModuleEnum.LOG, value = ActionTypeEnum.LIST)
|
||||
public PageResult<LogPageVO> getLogPage(
|
||||
@Valid LogQuery queryParams
|
||||
|
||||
@@ -41,6 +41,7 @@ public class MenuController {
|
||||
|
||||
@Operation(summary = "菜单列表")
|
||||
@GetMapping
|
||||
@PreAuthorize("@ss.hasPerm('sys:menu:list')")
|
||||
@Log(module = LogModuleEnum.MENU, value = ActionTypeEnum.LIST)
|
||||
public Result<List<MenuVO>> getMenus(@Valid MenuQuery queryParams) {
|
||||
List<MenuVO> menuList = menuService.listMenus(queryParams);
|
||||
|
||||
@@ -39,6 +39,7 @@ public class RoleController {
|
||||
|
||||
@Operation(summary = "角色分页列表")
|
||||
@GetMapping
|
||||
@PreAuthorize("@ss.hasPerm('sys:role:list')")
|
||||
@Log(module = LogModuleEnum.ROLE, value = ActionTypeEnum.LIST)
|
||||
public PageResult<RolePageVO> getRolePage(
|
||||
@Valid RoleQuery queryParams
|
||||
|
||||
@@ -76,6 +76,7 @@ public class UserController {
|
||||
|
||||
@Operation(summary = "用户列表")
|
||||
@GetMapping
|
||||
@PreAuthorize("@ss.hasPerm('sys:user:list')")
|
||||
@Log(module = LogModuleEnum.USER, value = ActionTypeEnum.LIST)
|
||||
public PageResult<UserPageVO> getUserList(
|
||||
@Valid UserQuery queryParams
|
||||
|
||||
Reference in New Issue
Block a user