Browse Source

fix shard bug

release_toaliyun_real
xiaohanzi 5 years ago
parent
commit
8edc5c1b56
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mybatis-multi-tenancy/src/main/java/com/iformall/plugin/shard/plugin/ShardingSpherePlugin.java

+ 1
- 1
mybatis-multi-tenancy/src/main/java/com/iformall/plugin/shard/plugin/ShardingSpherePlugin.java View File

@@ -195,7 +195,7 @@ public class ShardingSpherePlugin implements Interceptor {
return oldSql;
}
String newtable = getShareTable(table,parameterObject);
return oldSql.replaceAll(table+" ", newtable+" ").replaceAll(table+".", newtable+"。");
return oldSql.replaceAll(table+" ", newtable+" ").replaceAll(table+".", newtable+"。").replaceAll(table+")", newtable+")");
}
private String buildListTables(List<Table> tables,String oldSql,Object parameterObject) {


Loading…
Cancel
Save