类 AuthToRedis

java.lang.Object
com.mbap.pp.permission.service.AuthToRedis

@Component("authToRedis") public class AuthToRedis extends Object
储存权限到redis
作者:
Amanda.Z
  • 构造器详细资料

    • AuthToRedis

      public AuthToRedis()
  • 方法详细资料

    • setauthService

      @Autowired public void setauthService(RestResourceService restResourceService, ResourceService resourceService, StaffService staffService)
    • setRedisTemplate

      public void setRedisTemplate(org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate)
    • updateAuth

      public static void updateAuth(String ownerId, int ownerType, Set<String> oldResourceIds, Set<String> newResourceIds)
      用与部门、用户、用户组、客户端的权限变更
      参数:
      ownerId -
      ownerType -
      oldResourceIds -
      newResourceIds -
    • updateAuth

      public static void updateAuth(List<String> resourceIds)
      储存资源权限到redis(用于菜单新增、修改)
    • delAuth

      public static void delAuth(List<String> resourceIds)
      删除redis储存的资源权限(用于菜单删除)
      参数:
      resourceIds -
    • excludeAuth

      public static void excludeAuth(List<String> delresourceIds, List<String> addresourceIds, List<String> staffIds)
      将过滤的权限储存到redis RESOURCE_EXCLUDE_MAP
    • delExcludeAuth

      public static void delExcludeAuth(List<String> resourceIds)
      删除redis中的权限过滤
      参数:
      resourceIds -