From c14403b3ca02fcbff89ce54123e2b62f35a5a960 Mon Sep 17 00:00:00 2001 From: yulichang <570810310@qq.com> Date: Sat, 7 May 2022 19:06:31 +0800 Subject: [PATCH] fix https://gitee.com/best_handsome/mybatis-plus-join/issues/I56AIJ --- src/main/java/com/github/yulichang/method/SelectJoinCount.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/yulichang/method/SelectJoinCount.java b/src/main/java/com/github/yulichang/method/SelectJoinCount.java index 8503039..f573f1b 100644 --- a/src/main/java/com/github/yulichang/method/SelectJoinCount.java +++ b/src/main/java/com/github/yulichang/method/SelectJoinCount.java @@ -15,7 +15,7 @@ public class SelectJoinCount extends MPJAbstractMethod { @Override public MappedStatement injectMappedStatement(Class mapperClass, Class modelClass, TableInfo tableInfo) { SqlMethod sqlMethod = SqlMethod.SELECT_JOIN_COUNT; - String sql = String.format(sqlMethod.getSql(), sqlFirst(), sqlDistinct(), sqlCount(), + String sql = String.format(sqlMethod.getSql(), sqlFirst(), sqlCount(), tableInfo.getTableName(), sqlAlias(), sqlFrom(), sqlWhereEntityWrapper(true, tableInfo), sqlComment()); SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass); return this.addSelectMappedStatementForOther(mapperClass, sqlMethod.getMethod(), sqlSource, Integer.class);