24282 1 年之前
父节点
当前提交
9a4df54b4f
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      my-test/src/main/java/org/example/join/sql/SqlContext.java

+ 2 - 4
my-test/src/main/java/org/example/join/sql/SqlContext.java

@@ -56,13 +56,11 @@ public class SqlContext {
     }
 
     public static String getTableAlias(Table table) {
-        Map<String, String> tableAliasMap = getTableAliasMap();
         String tableAlias = table.getAlias();
-        String tableName = table.getName();
         if (StrUtil.isBlank(tableAlias)) {
-            tableAlias = tableAliasMap.get(tableName);
+            tableAlias = getTableAliasMap().get(table.getName());
             if (StrUtil.isBlank(tableAlias)) {
-                throw new IllegalArgumentException("未知连表:" + tableName);
+                throw new IllegalArgumentException("未知连表:" + table.getName());
             }
         }
         return tableAlias;