From 0a94a7173b5707beb4bfcf1ecdbfd788baad8e5d Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 13 四月 2026 16:14:17 +0800
Subject: [PATCH] fix: 采购退货dto缺失部门id集合

---
 src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java b/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java
index 1df5374..c46495b 100644
--- a/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java
+++ b/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java
@@ -9,11 +9,13 @@
 import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
 import com.ruoyi.common.handler.CustomTenantLineHandler;
+import com.ruoyi.common.interceptor.DataScopeSqlInterceptor;
 import org.apache.ibatis.executor.Executor;
 import org.apache.ibatis.mapping.BoundSql;
 import org.apache.ibatis.mapping.MappedStatement;
 import org.apache.ibatis.session.ResultHandler;
 import org.apache.ibatis.session.RowBounds;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
@@ -27,21 +29,26 @@
  */
 @EnableTransactionManagement(proxyTargetClass = true)
 @Configuration
-public class MybatisPlusConfig
-{
+public class MybatisPlusConfig {
+
+    @Autowired
+    private DataScopeSqlInterceptor dataScopeSqlInterceptor;
+
     @Bean
     public MybatisPlusInterceptor mybatisPlusInterceptor()
     {
         MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
         // 绉熸埛鎻掍欢
-        TenantLineInnerInterceptor tenantLineInnerInterceptor = new TenantLineInnerInterceptor(new CustomTenantLineHandler());
-        interceptor.addInnerInterceptor(tenantLineInnerInterceptor);
+//        TenantLineInnerInterceptor tenantLineInnerInterceptor = new TenantLineInnerInterceptor(new CustomTenantLineHandler());
+//        interceptor.addInnerInterceptor(tenantLineInnerInterceptor);
         // 鍒嗛〉鎻掍欢
         interceptor.addInnerInterceptor(paginationInnerInterceptor());
         // 涔愯閿佹彃浠�
         interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor());
         // 闃绘柇鎻掍欢
         interceptor.addInnerInterceptor(blockAttackInnerInterceptor());
+        // 鏁版嵁鏉冮檺鎻掍欢
+        interceptor.addInnerInterceptor(dataScopeSqlInterceptor);
         return interceptor;
     }
 

--
Gitblit v1.9.3