From 844e8b2f777b22f879be8f22d1224169c6a85e74 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: Mon, 7 Feb 2022 23:37:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20insertOrUpdateBatch?= =?UTF-8?q?=20=E8=8E=B7=E5=8F=96=E9=94=99=E8=AF=AF=20class=20=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java index de297935c..d3f619504 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java @@ -106,7 +106,7 @@ public interface BaseMapperPlus extends BaseMapper { Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!"); String keyProperty = tableInfo.getKeyProperty(); Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!"); - return SqlHelper.saveOrUpdateBatch(this.currentModelClass(), getClass(), log, entityList, batchSize, (sqlSession, entity) -> { + return SqlHelper.saveOrUpdateBatch(this.currentModelClass(), this.currentMapperClass(), log, entityList, batchSize, (sqlSession, entity) -> { Object idVal = tableInfo.getPropertyValue(entity, keyProperty); String sqlStatement = SqlHelper.getSqlStatement(this.currentMapperClass(), SqlMethod.INSERT_ONE); return StringUtils.checkValNull(idVal)