调整 YudaoDataPermissionAutoConfiguration 的自动配置

pull/2/head
YunaiV 2022-11-13 10:06:33 +08:00
parent 4807854df6
commit 0e903df380
1 changed files with 1 additions and 2 deletions

View File

@ -27,9 +27,8 @@ public class YudaoDataPermissionAutoConfiguration {
@Bean @Bean
public DataPermissionDatabaseInterceptor dataPermissionDatabaseInterceptor(MybatisPlusInterceptor interceptor, public DataPermissionDatabaseInterceptor dataPermissionDatabaseInterceptor(MybatisPlusInterceptor interceptor,
List<DataPermissionRule> rules) { DataPermissionRuleFactory ruleFactory) {
// 创建 DataPermissionDatabaseInterceptor 拦截器 // 创建 DataPermissionDatabaseInterceptor 拦截器
DataPermissionRuleFactory ruleFactory = dataPermissionRuleFactory(rules);
DataPermissionDatabaseInterceptor inner = new DataPermissionDatabaseInterceptor(ruleFactory); DataPermissionDatabaseInterceptor inner = new DataPermissionDatabaseInterceptor(ruleFactory);
// 添加到 interceptor 中 // 添加到 interceptor 中
// 需要加在首个,主要是为了在分页插件前面。这个是 MyBatis Plus 的规定 // 需要加在首个,主要是为了在分页插件前面。这个是 MyBatis Plus 的规定