add:QueryWrapper中innerJoin方法使用TableDef参数的重载

This commit is contained in:
凌尘 2023-03-06 20:01:24 +08:00
parent 91f935dd4a
commit acfd1e5844

View File

@ -181,6 +181,14 @@ public class QueryWrapper extends BaseQueryWrapper<QueryWrapper> {
return joining(Join.TYPE_INNER, table, condition); return joining(Join.TYPE_INNER, table, condition);
} }
public Joiner<QueryWrapper> innerJoin(TableDef table) {
return innerJoinIf(table, true);
}
public Joiner<QueryWrapper> innerJoinIf(TableDef table, boolean condition) {
return joining(Join.TYPE_INNER, table.getTableName(), condition);
}
public Joiner<QueryWrapper> innerJoin(QueryWrapper table) { public Joiner<QueryWrapper> innerJoin(QueryWrapper table) {
return joining(Join.TYPE_INNER, table, true); return joining(Join.TYPE_INNER, table, true);
} }