类 DataScopeInnerInterceptor

  • 所有已实现的接口:
    com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor

    public class DataScopeInnerInterceptor
    extends Object
    implements com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor
    数据权限拦截器

    1,全部:不限制 2,本级以及子级:只允许操作属于当前用户的 orgId 下的数据 3,本级:只允许操作与当前用户的 orgId 相同的数据 4,个人:自己创建的的数据 5,自定义

    作者:
    lym
    • 构造器详细资料

      • DataScopeInnerInterceptor

        public DataScopeInnerInterceptor()
    • 方法详细资料

      • findDataScope

        protected Optional<DataScope> findDataScope​(Object parameterObj)
        查找参数是否包括DataScope对象
        参数:
        parameterObj - 参数列表
        返回:
        DataScope
      • beforeQuery

        public void beforeQuery​(org.apache.ibatis.executor.Executor executor,
                                org.apache.ibatis.mapping.MappedStatement ms,
                                Object parameter,
                                org.apache.ibatis.session.RowBounds rowBounds,
                                org.apache.ibatis.session.ResultHandler resultHandler,
                                org.apache.ibatis.mapping.BoundSql boundSql)
        指定者:
        beforeQuery 在接口中 com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor