From da5f30cae2deb174a1ba37a2ad41ff1ba42c9f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 16 Jul 2026 18:39:40 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8D=87=E7=BA=A7=20=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E4=BE=9D=E8=B5=96=E7=89=88=E6=9C=AC=E4=B8=8E=E9=80=82?= =?UTF-8?q?=E9=85=8D=E6=80=A7=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 22 ++++++++-------- .../yulichang/injector/MPJSqlInjector.java | 25 ++++++------------- .../handler/PlusPostInitTableInfoHandler.java | 4 ++- 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/pom.xml b/pom.xml index 0b910d34b..1e004a663 100644 --- a/pom.xml +++ b/pom.xml @@ -21,14 +21,14 @@ 4.1.0 - 4.1.1 + 4.1.2 2.0.0 3.0.3 3.5.19 - 3.5.16 - 1.5.7 + 3.5.17 + 1.5.9 4.5.0 8.7.3-20260306 3.0.2 @@ -37,7 +37,7 @@ 1.45.0 1.16.7 - 1.84 + 1.85 4.6.1 @@ -46,26 +46,26 @@ 1.0.0 - 5.8.46 + 5.8.47 1.5.1 0.2.0 - 1.18.42 + 1.18.46 0.15.0 2.0.2-incubating - 1.2.0 + 1.3.0 - 3.3.6 + 3.3.7 - 2.42.9 + 2.48.1 3.3.5 - 1.8.8 + 1.8.9 2.16.0 - 2.6.6 + 2.6.8 3.5.0 diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java index 62de444c2..df6044e48 100644 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java +++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java @@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.injector.methods.SelectList; import com.baomidou.mybatisplus.core.mapper.Mapper; import com.baomidou.mybatisplus.core.metadata.TableInfo; import com.baomidou.mybatisplus.core.toolkit.ArrayUtils; -import com.github.yulichang.adapter.base.tookit.VersionUtils; import com.github.yulichang.base.JoinMapper; import com.github.yulichang.method.*; import com.github.yulichang.toolkit.MPJTableMapperHelper; @@ -113,23 +112,13 @@ public class MPJSqlInjector extends DefaultSqlInjector { */ private List getJoinMethod() { List list = new ArrayList<>(); - if (VersionUtils.compare(VersionUtils.getVersion(), "3.5.0") >= 0) { - list.add(new DeleteJoin(SqlMethod.DELETE_JOIN.getMethod())); - list.add(new UpdateJoin(SqlMethod.UPDATE_JOIN.getMethod())); - list.add(new UpdateJoinAndNull(SqlMethod.UPDATE_JOIN_AND_NULL.getMethod())); - list.add(new SelectJoinCount(SqlMethod.SELECT_JOIN_COUNT.getMethod())); - list.add(new SelectJoinOne(SqlMethod.SELECT_JOIN_ONE.getMethod())); - list.add(new SelectJoinList(SqlMethod.SELECT_JOIN_LIST.getMethod())); - list.add(new SelectJoinPage(SqlMethod.SELECT_JOIN_PAGE.getMethod())); - } else { - list.add(new DeleteJoin()); - list.add(new UpdateJoin()); - list.add(new UpdateJoinAndNull()); - list.add(new SelectJoinCount()); - list.add(new SelectJoinOne()); - list.add(new SelectJoinList()); - list.add(new SelectJoinPage()); - } + list.add(new DeleteJoin(SqlMethod.DELETE_JOIN.getMethod())); + list.add(new UpdateJoin(SqlMethod.UPDATE_JOIN.getMethod())); + list.add(new UpdateJoinAndNull(SqlMethod.UPDATE_JOIN_AND_NULL.getMethod())); + list.add(new SelectJoinCount(SqlMethod.SELECT_JOIN_COUNT.getMethod())); + list.add(new SelectJoinOne(SqlMethod.SELECT_JOIN_ONE.getMethod())); + list.add(new SelectJoinList(SqlMethod.SELECT_JOIN_LIST.getMethod())); + list.add(new SelectJoinPage(SqlMethod.SELECT_JOIN_PAGE.getMethod())); return list; } diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/PlusPostInitTableInfoHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/PlusPostInitTableInfoHandler.java index a5585f9a0..58c1ae148 100644 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/PlusPostInitTableInfoHandler.java +++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/PlusPostInitTableInfoHandler.java @@ -20,14 +20,16 @@ public class PlusPostInitTableInfoHandler implements PostInitTableInfoHandler { * * @param tableInfo 表信息 * @param configuration MyBatis 配置 + * @return 调整后的表信息 */ @Override - public void postTableInfo(TableInfo tableInfo, Configuration configuration) { + public TableInfo postTableInfo(TableInfo tableInfo, Configuration configuration) { String flag = SpringUtils.getProperty("mybatis-plus.enableLogicDelete", "true"); // 只有关闭时 统一设置false 为true时mp自动判断不处理 if (!Convert.toBool(flag)) { ReflectUtils.setFieldValue(tableInfo, "withLogicDelete", false); } + return tableInfo; } }