فهرست منبع

feat Dockerfile部署脚本添加

1 هفته پیش
والد
کامیت
d958be1a4f

+ 4 - 0
edu-travel-common/edu-travel-common-datasource/pom.xml

@@ -67,5 +67,9 @@
             <artifactId>jsqlparser</artifactId>
             <version>4.5</version>  <!-- 检查最新版本 -->
         </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 5 - 3
edu-travel-common/edu-travel-common-datasource/src/main/java/edu/travel/datasource/ProjectInterceptor.java

@@ -1,5 +1,6 @@
 package edu.travel.datasource;
 
+import cn.hutool.core.util.ReflectUtil;
 import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor;
@@ -89,9 +90,10 @@ public void beforeUpdate(Executor executor, MappedStatement ms, Object parameter
                 update.setTable(delete.getTable());
                 update.setWhere(delete.getWhere());
                 update.addUpdateSet(new Column("delete_flag"), new LongValue(1));
-                PluginUtils.MPBoundSql mpBoundSql = PluginUtils.mpBoundSql(boundSql);
-                System.out.println(update.toString());
-                mpBoundSql.sql(update.toString());
+                Field sqlField = ReflectUtil.getField(BoundSql.class, "sql");
+                ReflectUtil.setFieldValue(boundSql, sqlField, update.toString());
+                System.out.println("转换后的 SQL: " + update.toString());  // 打印验证
+
             }
         } catch (Exception e) {
             throw new SQLException("SQL转换失败", e);