From d862bef4262f290aa9f5fd646837f7deea9c7006 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 13 四月 2026 16:29:08 +0800
Subject: [PATCH] fix(order): 修复订单编号生成中的字段名不一致问题
---
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