mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
refactor: 获取 join 连表信息时携带别名。
This commit is contained in:
parent
59d49ba67a
commit
d5220988a1
@ -120,8 +120,13 @@ public class MapperUtil {
|
||||
List<String> joinTables = new ArrayList<>();
|
||||
joins.forEach(join -> {
|
||||
QueryTable joinQueryTable = CPI.getJoinQueryTable(join);
|
||||
if (joinQueryTable != null && StringUtil.isNotBlank(joinQueryTable.getName())) {
|
||||
joinTables.add(joinQueryTable.getName());
|
||||
if (joinQueryTable != null) {
|
||||
String tableName = joinQueryTable.getName();
|
||||
if (joinQueryTable.getAlias() != null) {
|
||||
joinTables.add(tableName + "." + joinQueryTable.getAlias());
|
||||
} else {
|
||||
joinTables.add(tableName);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user