From 81c220fd9e0ea6c8ee84c9b766885b0322b4038c Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期四, 15 八月 2024 14:47:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 iailab-framework/iailab-common-biz-data-permission/src/main/java/com/iailab/framework/datapermission/config/IailabDataPermissionAutoConfiguration.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/iailab-framework/iailab-common-biz-data-permission/src/main/java/com/iailab/framework/datapermission/config/IailabDataPermissionAutoConfiguration.java b/iailab-framework/iailab-common-biz-data-permission/src/main/java/com/iailab/framework/datapermission/config/IailabDataPermissionAutoConfiguration.java
index d2c481d..7428e3c 100644
--- a/iailab-framework/iailab-common-biz-data-permission/src/main/java/com/iailab/framework/datapermission/config/IailabDataPermissionAutoConfiguration.java
+++ b/iailab-framework/iailab-common-biz-data-permission/src/main/java/com/iailab/framework/datapermission/config/IailabDataPermissionAutoConfiguration.java
@@ -1,7 +1,8 @@
 package com.iailab.framework.datapermission.config;
 
+import com.baomidou.mybatisplus.extension.plugins.inner.DataPermissionInterceptor;
 import com.iailab.framework.datapermission.core.aop.DataPermissionAnnotationAdvisor;
-import com.iailab.framework.datapermission.core.db.DataPermissionDatabaseInterceptor;
+import com.iailab.framework.datapermission.core.db.DataPermissionRuleHandler;
 import com.iailab.framework.datapermission.core.rule.DataPermissionRule;
 import com.iailab.framework.datapermission.core.rule.DataPermissionRuleFactory;
 import com.iailab.framework.datapermission.core.rule.DataPermissionRuleFactoryImpl;
@@ -26,16 +27,18 @@
     }
 
     @Bean
-    public DataPermissionDatabaseInterceptor dataPermissionDatabaseInterceptor(MybatisPlusInterceptor interceptor,
-                                                                               DataPermissionRuleFactory ruleFactory) {
-        // 创建 DataPermissionDatabaseInterceptor 拦截器
-        DataPermissionDatabaseInterceptor inner = new DataPermissionDatabaseInterceptor(ruleFactory);
+    public DataPermissionRuleHandler dataPermissionRuleHandler(MybatisPlusInterceptor interceptor,
+                                                               DataPermissionRuleFactory ruleFactory) {
+        // 创建 DataPermissionInterceptor 拦截器
+        DataPermissionRuleHandler handler = new DataPermissionRuleHandler(ruleFactory);
+        DataPermissionInterceptor inner = new DataPermissionInterceptor(handler);
         // 添加到 interceptor 中
         // 需要加在首个,主要是为了在分页插件前面。这个是 MyBatis Plus 的规定
         MyBatisUtils.addInterceptor(interceptor, inner, 0);
-        return inner;
+        return handler;
     }
 
+
     @Bean
     public DataPermissionAnnotationAdvisor dataPermissionAnnotationAdvisor() {
         return new DataPermissionAnnotationAdvisor();

--
Gitblit v1.9.3