nieqiurong 6 лет назад
Родитель
Сommit
5dc844bee7

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/mapper/LogicSqlInjector.java

@@ -127,7 +127,7 @@ public class LogicSqlInjector extends AutoSqlInjector {
                     table.getTableName(), table.getKeyColumn(), ids.toString(), getLogicDeleteSql(table)), modelClass);
             } else {
                 sqlSource = new RawSqlSource(configuration, String.format(sqlMethod.getSql(), sqlSelectColumns(table, false), table.getTableName(),
-                    table.getKeyColumn(), table.getKeyProperty(), getLogicDeleteSql(table)), Object.class);
+                    table.getKeyColumn(), table.getKeyProperty(), getLogicDeleteSql(table)), modelClass);
             }
             this.addSelectMappedStatement(mapperClass, sqlMethod.getMethod(), sqlSource, modelClass, table);
         } else {

+ 1 - 1
mybatis-plus-support/src/main/java/com/baomidou/mybatisplus/mapper/AutoSqlInjector.java

@@ -422,7 +422,7 @@ public class AutoSqlInjector implements ISqlInjector {
                 sqlSelectColumns(table, false), table.getTableName(), table.getKeyColumn(), ids.toString()), modelClass);
         } else {
             sqlSource = new RawSqlSource(configuration, String.format(sqlMethod.getSql(), sqlSelectColumns(table, false),
-                table.getTableName(), table.getKeyColumn(), table.getKeyProperty()), Object.class);
+                table.getTableName(), table.getKeyColumn(), table.getKeyProperty()), modelClass);
         }
         this.addSelectMappedStatement(mapperClass, sqlMethod.getMethod(), sqlSource, modelClass, table);
     }