| | |
| | | tableList.add(new TableDTO("web_site","tb_devtmp_record")); |
| | | tableList.add(new TableDTO("web_site","tb_stationtraffic")); |
| | | |
| | | //进行一次过滤,查询出来所有的库中表 |
| | | List<TableDTO> tableList2 = mapper.findAllTables(); |
| | | for (int i = 0; i < tableList.size(); i++) { |
| | | boolean compareFlag = false; |
| | | for (int j = 0; j < tableList2.size(); j++) { |
| | | if((tableList.get(i).getDbName()+tableList.get(i).getTableName()) |
| | | .equals(tableList2.get(j).getDbName()+tableList2.get(j).getTableName())){ |
| | | compareFlag = true; |
| | | break; |
| | | } |
| | | } |
| | | //匹配ok |
| | | if(!compareFlag){ |
| | | tableList.remove(i); |
| | | i--; |
| | | } |
| | | } |
| | | |
| | | mapper.clearTable(tableList); |
| | | } |
| | | |