zoukankan      html  css  js  c++  java
  • mybatisplus 多租户屏蔽某个特定mapper的方法@InterceptorIgnore

    背景

           项目中使用了mybatis plus多租户插件,再与数据交换过程中,每个sql都会加上租户的条件。

    但是某些特定sql不需要加租户条件过滤

    @InterceptorIgnore使用

    多租户屏蔽某个特定mapper的方法,则在特定mapper方法上加注解:@InterceptorIgnore(tenantLine = "true")

    生成sql语句:

    注意使用了分页插件时,该注解会失效


    @InterceptorIgnore的其他用法


    各属性返回 true 表示不走插件(在配置了插件的情况下,不填则默认表示 false)

  • 相关阅读:
    七夕祭
    Running Median
    电影Cinema
    Best Cow Fences
    Sumdiv
    Tallest Cow
    激光炸弹
    Strange Towers of Hanoi
    Gerald and Giant Chess
    CF24D Broken robot
  • 原文地址:https://www.cnblogs.com/zhangxianming/p/15560033.html
Copyright © 2011-2022 走看看