From 6755515b1ffc880f51362bc61e7fb09a510c1839 Mon Sep 17 00:00:00 2001 From: misworga831 Date: Mon, 22 Jan 2024 10:43:09 +0800 Subject: [PATCH] =?UTF-8?q?upgrade:=20=E6=9B=B4=E6=96=B0=20hutool=20?= =?UTF-8?q?=E5=92=8C=20mybatis=20plus=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatisplus/external/InsertIgnoreBatchAllColumn.java | 6 +++++- .../lili/mybatis/mybatisplus/external/SpiceSqlInjector.java | 2 +- pom.xml | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/InsertIgnoreBatchAllColumn.java b/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/InsertIgnoreBatchAllColumn.java index 9b3bf815..5a601cb9 100644 --- a/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/InsertIgnoreBatchAllColumn.java +++ b/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/InsertIgnoreBatchAllColumn.java @@ -28,6 +28,10 @@ public class InsertIgnoreBatchAllColumn extends AbstractMethod { @Accessors(chain = true) private Predicate predicate; + protected InsertIgnoreBatchAllColumn(String methodName) { + super(methodName); + } + @SuppressWarnings("Duplicates") @Override public MappedStatement injectMappedStatement(Class mapperClass, Class modelClass, TableInfo tableInfo) { @@ -36,7 +40,7 @@ public class InsertIgnoreBatchAllColumn extends AbstractMethod { String sqlTemplate = ""; List fieldList = tableInfo.getFieldList(); - String insertSqlColumn = tableInfo.getKeyInsertSqlColumn(true, false) + + String insertSqlColumn = tableInfo.getKeyInsertSqlColumn(true, "", false) + this.filterTableFieldInfo(fieldList, predicate, TableFieldInfo::getInsertSqlColumn, EMPTY); String columnScript = LEFT_BRACKET + insertSqlColumn.substring(0, insertSqlColumn.length() - 1) + RIGHT_BRACKET; String insertSqlProperty = tableInfo.getKeyInsertSqlProperty(true, ENTITY_DOT, false) + diff --git a/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java b/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java index 78f98eeb..f27c9382 100644 --- a/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java +++ b/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java @@ -28,7 +28,7 @@ public class SpiceSqlInjector extends DefaultSqlInjector { // methodList.add(new InsertBatchSomeColumn(t -> !t.isLogicDelete() && !"update_time".equals(t.getColumn()))); // 要逻辑删除 t.isLogicDelete() 默认不要 methodList.add(new InsertBatchSomeColumn(t -> !t.isLogicDelete())); - methodList.add(new InsertIgnoreBatchAllColumn()); + methodList.add(new InsertIgnoreBatchAllColumn("insertIgnoreBatchAllColumn")); return methodList; } } diff --git a/pom.xml b/pom.xml index 4245d25f..578abc28 100644 --- a/pom.xml +++ b/pom.xml @@ -25,12 +25,12 @@ registry.cn-beijing.aliyuncs.com/lili-images 1 4.22.32.ALL - 3.5.1 - 5.8.14 + 3.5.5 + 5.8.24 2.0.3.RELEASE 3.0.4 2.9.10 - 1.18.24 + 1.18.30 3.15.6 4.5.18 3.11.1