| | |
| | | import com.baomidou.mybatisplus.extension.MybatisMapWrapperFactory; |
| | | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | |
| | | public MybatisPlusInterceptor mybatisPlusInterceptor() { |
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); |
| | | |
| | | // 添加乐观锁插件 |
| | | interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor()); |
| | | |
| | | // 多租户插件配置 |
| | | TenantLineHandler tenantLineHandler = new TenantLineHandler() { |
| | | @Override |
| | |
| | | "sys_role_menu", |
| | | "sys_menu", |
| | | "man_loc_type_rela", |
| | | "man_qly_inspect_result" |
| | | "man_qly_inspect_result", |
| | | "view_stock_manage", |
| | | "view_stock_statistic", |
| | | "man_transfer_order", |
| | | "man_wave_order_rela" |
| | | ).contains(tableName); |
| | | } |
| | | }; |
| | |
| | | } |
| | | }; |
| | | } |
| | | |
| | | } |