mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
sql换行
This commit is contained in:
parent
7b33070fa4
commit
630c320cd3
@ -31,13 +31,13 @@ public class DeleteJoin extends MPJAbstractMethod {
|
|||||||
if (AdapterHelper.getTableInfoAdapter().mpjHasLogic(tableInfo)) {
|
if (AdapterHelper.getTableInfoAdapter().mpjHasLogic(tableInfo)) {
|
||||||
String sql = String.format(sqlMethod.getSql(), sqlFirst(), mpjTableName(tableInfo), sqlAlias(), sqlFrom(),
|
String sql = String.format(sqlMethod.getSql(), sqlFirst(), mpjTableName(tableInfo), sqlAlias(), sqlFrom(),
|
||||||
mpjDeleteLogic(tableInfo), sqlWhereEntityWrapper(true, tableInfo), sqlComment());
|
mpjDeleteLogic(tableInfo), sqlWhereEntityWrapper(true, tableInfo), sqlComment());
|
||||||
SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass);
|
SqlSource sqlSource = languageDriver.createSqlSource(configuration, removeExtraWhitespaces(sql), modelClass);
|
||||||
return this.addUpdateMappedStatement(mapperClass, modelClass, sqlMethod.getMethod(), sqlSource);
|
return this.addUpdateMappedStatement(mapperClass, modelClass, sqlMethod.getMethod(), sqlSource);
|
||||||
} else {
|
} else {
|
||||||
sqlMethod = SqlMethod.DELETE_JOIN;
|
sqlMethod = SqlMethod.DELETE_JOIN;
|
||||||
String sql = String.format(sqlMethod.getSql(), sqlFirst(), mpjDelete(), mpjTableName(tableInfo),
|
String sql = String.format(sqlMethod.getSql(), sqlFirst(), mpjDelete(), mpjTableName(tableInfo),
|
||||||
sqlAlias(), sqlFrom(), sqlWhereEntityWrapper(true, tableInfo), sqlComment());
|
sqlAlias(), sqlFrom(), sqlWhereEntityWrapper(true, tableInfo), sqlComment());
|
||||||
SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass);
|
SqlSource sqlSource = languageDriver.createSqlSource(configuration, removeExtraWhitespaces(sql), modelClass);
|
||||||
return this.addDeleteMappedStatement(mapperClass, sqlMethod.getMethod(), sqlSource);
|
return this.addDeleteMappedStatement(mapperClass, sqlMethod.getMethod(), sqlSource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user