mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-13 21:52:48 +00:00
注解缓存sa-token的@SaCheckRole(
This commit is contained in:
parent
cac4121209
commit
3e107d766e
@ -210,7 +210,7 @@ public class LoginController {
|
|||||||
//清空用户的缓存信息(包括部门信息),例如sys:cache:user::<username>
|
//清空用户的缓存信息(包括部门信息),例如sys:cache:user::<username>
|
||||||
redisUtil.del(String.format("%s::%s", CacheConstant.SYS_USERS_CACHE, sysUser.getUsername()));
|
redisUtil.del(String.format("%s::%s", CacheConstant.SYS_USERS_CACHE, sysUser.getUsername()));
|
||||||
baseCommonService.addLog("用户名: "+sysUser.getRealname()+",退出成功!", CommonConstant.LOG_TYPE_1, null, sysUser);
|
baseCommonService.addLog("用户名: "+sysUser.getRealname()+",退出成功!", CommonConstant.LOG_TYPE_1, null, sysUser);
|
||||||
log.info("【退出成功】异步清理用户缓存: {} : ", sysUser.getRealname());
|
log.info("【退出成功】异步清理用户缓存: {} ", sysUser.getRealname());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,7 +564,7 @@ public class LoginController {
|
|||||||
// /**
|
// /**
|
||||||
// * 切换菜单表为vue3的表
|
// * 切换菜单表为vue3的表
|
||||||
// */
|
// */
|
||||||
// @RequiresRoles({"admin"})
|
// @SaCheckRole({"admin"})
|
||||||
// @GetMapping(value = "/switchVue3Menu")
|
// @GetMapping(value = "/switchVue3Menu")
|
||||||
// public Result<String> switchVue3Menu(HttpServletResponse response) {
|
// public Result<String> switchVue3Menu(HttpServletResponse response) {
|
||||||
// Result<String> res = new Result<String>();
|
// Result<String> res = new Result<String>();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package org.jeecg.modules.system.controller;
|
package org.jeecg.modules.system.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -773,7 +774,7 @@ public class SysDepartController {
|
|||||||
*/
|
*/
|
||||||
@PutMapping("/updateChangeDepart")
|
@PutMapping("/updateChangeDepart")
|
||||||
@SaCheckPermission("system:depart:updateChange")
|
@SaCheckPermission("system:depart:updateChange")
|
||||||
@RequiresRoles({"admin"})
|
@SaCheckRole({"admin"})
|
||||||
public Result<String> updateChangeDepart(@RequestBody SysChangeDepartVo changeDepartVo) {
|
public Result<String> updateChangeDepart(@RequestBody SysChangeDepartVo changeDepartVo) {
|
||||||
sysDepartService.updateChangeDepart(changeDepartVo);
|
sysDepartService.updateChangeDepart(changeDepartVo);
|
||||||
return Result.ok("调整部门位置成功!");
|
return Result.ok("调整部门位置成功!");
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package org.jeecg.modules.system.controller;
|
|||||||
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@ -327,7 +328,7 @@ public class SysUserController {
|
|||||||
* @param usernames
|
* @param usernames
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresRoles({"admin"})
|
@SaCheckRole({"admin"})
|
||||||
@SaCheckPermission("system:user:resetPassword")
|
@SaCheckPermission("system:user:resetPassword")
|
||||||
@RequestMapping(value = "/resetPassword", method = RequestMethod.PUT)
|
@RequestMapping(value = "/resetPassword", method = RequestMethod.PUT)
|
||||||
public Result<SysUser> resetPassword(@RequestParam(name = "usernames") String usernames) {
|
public Result<SysUser> resetPassword(@RequestParam(name = "usernames") String usernames) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user