【同步】BOOT 和 CLOUD 的功能(所有)
This commit is contained in:
@@ -89,7 +89,7 @@ public class UserController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:list')")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:query')")
|
||||
public CommonResult<PageResult<UserRespVO>> getUserPage(@Valid UserPageReqVO pageReqVO) {
|
||||
// 获得用户分页列表
|
||||
PageResult<AdminUserDO> pageResult = userService.getUserPage(pageReqVO);
|
||||
|
||||
@@ -132,8 +132,12 @@ public class PermissionServiceImpl implements PermissionService {
|
||||
|
||||
@Override
|
||||
@DSTransactional // 多数据源,使用 @DSTransactional 保证本地事务,以及数据源的切换
|
||||
@CacheEvict(value = RedisKeyConstants.MENU_ROLE_ID_LIST,
|
||||
@Caching(evict = {
|
||||
@CacheEvict(value = RedisKeyConstants.MENU_ROLE_ID_LIST,
|
||||
allEntries = true),
|
||||
@CacheEvict(value = RedisKeyConstants.PERMISSION_MENU_ID_LIST,
|
||||
allEntries = true) // allEntries 清空所有缓存,主要一次更新涉及到的 menuIds 较多,反倒批量会更快
|
||||
})
|
||||
public void assignRoleMenu(Long roleId, Set<Long> menuIds) {
|
||||
// 获得角色拥有菜单编号
|
||||
Set<Long> dbMenuIds = convertSet(roleMenuMapper.selectListByRoleId(roleId), RoleMenuDO::getMenuId);
|
||||
|
||||
Reference in New Issue
Block a user