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);