mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
优化:当只查询一张表时,生成的字段无效添加表前缀
This commit is contained in:
parent
15410aed76
commit
62a6fb1342
@ -96,7 +96,11 @@ class WrapperUtil {
|
||||
|
||||
|
||||
public static String getColumnTableName(List<QueryTable> queryTables, QueryTable queryTable) {
|
||||
if (queryTables == null || queryTables.size() <= 1){
|
||||
if (queryTables == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (queryTables.size() == 1 && queryTables.get(0).isSameTable(queryTable)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -104,6 +108,7 @@ class WrapperUtil {
|
||||
if (realTable == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return StringUtil.isNotBlank(realTable.alias) ? realTable.alias : realTable.name;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user