|
@@ -29,11 +29,11 @@ import org.apache.ibatis.mapping.SqlSource;
|
|
* @since 2018-04-06
|
|
* @since 2018-04-06
|
|
*/
|
|
*/
|
|
public class DeleteBatchByIds extends AbstractMethod {
|
|
public class DeleteBatchByIds extends AbstractMethod {
|
|
-
|
|
|
|
|
|
+
|
|
public DeleteBatchByIds() {
|
|
public DeleteBatchByIds() {
|
|
super("deleteBatchIds");
|
|
super("deleteBatchIds");
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @param name 方法名
|
|
* @param name 方法名
|
|
* @since 3.4.4
|
|
* @since 3.4.4
|
|
@@ -41,7 +41,7 @@ public class DeleteBatchByIds extends AbstractMethod {
|
|
public DeleteBatchByIds(String name) {
|
|
public DeleteBatchByIds(String name) {
|
|
super(name);
|
|
super(name);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) {
|
|
public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) {
|
|
String sql;
|
|
String sql;
|
|
@@ -54,7 +54,7 @@ public class DeleteBatchByIds extends AbstractMethod {
|
|
"#{item}", "#{item." + tableInfo.getKeyProperty() + "}"),
|
|
"#{item}", "#{item." + tableInfo.getKeyProperty() + "}"),
|
|
COLLECTION, null, "item", COMMA),
|
|
COLLECTION, null, "item", COMMA),
|
|
tableInfo.getLogicDeleteSql(true, true));
|
|
tableInfo.getLogicDeleteSql(true, true));
|
|
- SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, tableInfo.getKeyType());
|
|
|
|
|
|
+ SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, Object.class);
|
|
return addUpdateMappedStatement(mapperClass, modelClass, this.name, sqlSource);
|
|
return addUpdateMappedStatement(mapperClass, modelClass, this.name, sqlSource);
|
|
} else {
|
|
} else {
|
|
sqlMethod = SqlMethod.DELETE_BATCH_BY_IDS;
|
|
sqlMethod = SqlMethod.DELETE_BATCH_BY_IDS;
|
|
@@ -63,7 +63,7 @@ public class DeleteBatchByIds extends AbstractMethod {
|
|
SqlScriptUtils.convertChoose("@org.apache.ibatis.type.SimpleTypeRegistry@isSimpleType(item.getClass())",
|
|
SqlScriptUtils.convertChoose("@org.apache.ibatis.type.SimpleTypeRegistry@isSimpleType(item.getClass())",
|
|
"#{item}", "#{item." + tableInfo.getKeyProperty() + "}"),
|
|
"#{item}", "#{item." + tableInfo.getKeyProperty() + "}"),
|
|
COLLECTION, null, "item", COMMA));
|
|
COLLECTION, null, "item", COMMA));
|
|
- SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, tableInfo.getKeyType());
|
|
|
|
|
|
+ SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, Object.class);
|
|
return this.addDeleteMappedStatement(mapperClass, this.name, sqlSource);
|
|
return this.addDeleteMappedStatement(mapperClass, this.name, sqlSource);
|
|
}
|
|
}
|
|
}
|
|
}
|