From 630c320cd322ee866a3d165a32e4770e7679d33c Mon Sep 17 00:00:00 2001 From: yulichang <570810310@qq.com> Date: Fri, 17 Nov 2023 07:19:52 +0800 Subject: [PATCH] =?UTF-8?q?sql=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/github/yulichang/method/DeleteJoin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/DeleteJoin.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/DeleteJoin.java index 0548e55..332fcb9 100644 --- a/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/DeleteJoin.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/DeleteJoin.java @@ -31,13 +31,13 @@ public class DeleteJoin extends MPJAbstractMethod { if (AdapterHelper.getTableInfoAdapter().mpjHasLogic(tableInfo)) { String sql = String.format(sqlMethod.getSql(), sqlFirst(), mpjTableName(tableInfo), sqlAlias(), sqlFrom(), mpjDeleteLogic(tableInfo), sqlWhereEntityWrapper(true, tableInfo), sqlComment()); - SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass); + SqlSource sqlSource = languageDriver.createSqlSource(configuration, removeExtraWhitespaces(sql), modelClass); return this.addUpdateMappedStatement(mapperClass, modelClass, sqlMethod.getMethod(), sqlSource); } else { sqlMethod = SqlMethod.DELETE_JOIN; String sql = String.format(sqlMethod.getSql(), sqlFirst(), mpjDelete(), mpjTableName(tableInfo), sqlAlias(), sqlFrom(), sqlWhereEntityWrapper(true, tableInfo), sqlComment()); - SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass); + SqlSource sqlSource = languageDriver.createSqlSource(configuration, removeExtraWhitespaces(sql), modelClass); return this.addDeleteMappedStatement(mapperClass, sqlMethod.getMethod(), sqlSource); } }