|
@@ -36,16 +36,14 @@ public class Delete extends AbstractMethod {
|
|
|
if (tableInfo.isLogicDelete()) {
|
|
|
sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(), sqlLogicSet(tableInfo),
|
|
|
sqlWhereEntityWrapper(true, tableInfo));
|
|
|
+ SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass);
|
|
|
+ return addUpdateMappedStatement(mapperClass, modelClass, sqlMethod.getMethod(), sqlSource);
|
|
|
} else {
|
|
|
sqlMethod = SqlMethod.DELETE;
|
|
|
sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(),
|
|
|
sqlWhereEntityWrapper(true, tableInfo));
|
|
|
+ SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass);
|
|
|
+ return this.addDeleteMappedStatement(mapperClass, sqlMethod.getMethod(), sqlSource);
|
|
|
}
|
|
|
- SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass);
|
|
|
- if (tableInfo.isLogicDelete()) {
|
|
|
- // todo parameterType 应该是 Wrapper.class 吧
|
|
|
- return this.addUpdateMappedStatement(mapperClass, modelClass, sqlMethod.getMethod(), sqlSource);
|
|
|
- }
|
|
|
- return this.addDeleteMappedStatement(mapperClass, sqlMethod.getMethod(), sqlSource);
|
|
|
}
|
|
|
}
|