|
|
|
@@ -186,16 +186,16 @@ public class ShardingSpherePlugin implements Interceptor { |
|
|
|
return buildByListTableNames(tableList, oldSql, parameterObject); |
|
|
|
} |
|
|
|
|
|
|
|
private String buildTable(Table table,String oldSql,Object parameterObject) { |
|
|
|
return buildByTableName(table.getName(), oldSql, parameterObject); |
|
|
|
} |
|
|
|
|
|
|
|
private String buildByTableName(String table,String oldSql,Object parameterObject) { |
|
|
|
if (!ShardingTableExcuter.isShardingTable(table)) { |
|
|
|
return oldSql; |
|
|
|
} |
|
|
|
String newtable = getShareTable(table,parameterObject); |
|
|
|
return oldSql.replaceAll(table, newtable); |
|
|
|
} |
|
|
|
|
|
|
|
private String buildTable(Table table,String oldSql,Object parameterObject) { |
|
|
|
return buildByTableName(table.getName(), oldSql, parameterObject); |
|
|
|
return oldSql.replaceAll(table+" ", newtable+" ").replaceAll(table+".", newtable+"。"); |
|
|
|
} |
|
|
|
|
|
|
|
private String buildListTables(List<Table> tables,String oldSql,Object parameterObject) { |
|
|
|
|