From 2115edcfb45a3c177d4657f0691409a9da23f77a Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Mon, 21 Sep 2020 18:29:44 +0800
Subject: [PATCH] 菜单新增是否缓存keep-alive
---
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java
index 857721e..ac58c18 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java
@@ -4,7 +4,6 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
@@ -21,6 +20,7 @@
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.PreAuthorize;
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.system.api.domain.SysRole;
import com.ruoyi.system.service.ISysRoleService;
@@ -37,7 +37,7 @@
@Autowired
private ISysRoleService roleService;
- @PreAuthorize("@ss.hasPermi('system:role:list')")
+ @PreAuthorize(hasPermi = "system:role:list")
@GetMapping("/list")
public TableDataInfo list(SysRole role)
{
@@ -47,7 +47,7 @@
}
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
- @PreAuthorize("@ss.hasPermi('system:role:export')")
+ @PreAuthorize(hasPermi = "system:role:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysRole role) throws IOException
{
@@ -59,7 +59,7 @@
/**
* 根据角色编号获取详细信息
*/
- @PreAuthorize("@ss.hasPermi('system:role:query')")
+ @PreAuthorize(hasPermi = "system:role:query")
@GetMapping(value = "/{roleId}")
public AjaxResult getInfo(@PathVariable Long roleId)
{
@@ -69,7 +69,7 @@
/**
* 新增角色
*/
- @PreAuthorize("@ss.hasPermi('system:role:add')")
+ @PreAuthorize(hasPermi = "system:role:add")
@Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysRole role)
@@ -90,7 +90,7 @@
/**
* 修改保存角色
*/
- @PreAuthorize("@ss.hasPermi('system:role:edit')")
+ @PreAuthorize(hasPermi = "system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysRole role)
@@ -111,7 +111,7 @@
/**
* 修改保存数据权限
*/
- @PreAuthorize("@ss.hasPermi('system:role:edit')")
+ @PreAuthorize(hasPermi = "system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/dataScope")
public AjaxResult dataScope(@RequestBody SysRole role)
@@ -123,7 +123,7 @@
/**
* 状态修改
*/
- @PreAuthorize("@ss.hasPermi('system:role:edit')")
+ @PreAuthorize(hasPermi = "system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysRole role)
@@ -136,7 +136,7 @@
/**
* 删除角色
*/
- @PreAuthorize("@ss.hasPermi('system:role:remove')")
+ @PreAuthorize(hasPermi = "system:role:remove")
@Log(title = "角色管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{roleIds}")
public AjaxResult remove(@PathVariable Long[] roleIds)
@@ -147,7 +147,7 @@
/**
* 获取角色选择框列表
*/
- @PreAuthorize("@ss.hasPermi('system:role:query')")
+ @PreAuthorize(hasPermi = "system:role:query")
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
--
Gitblit v1.9.3