Commit 342ae07d authored by 黎博's avatar 黎博

修改同步数据库时获取数据库列表和表列表接口

parent 6e68f512
......@@ -112,8 +112,10 @@ public class DbSyncController {
* @return
*/
@GetMapping("/tableList")
public String getTableListForSync(@RequestParam String database) {
List<String> tableList = databaseSyncService.getTableListByDb(ip, port, username, password, database);
public String getTableListForSync(@RequestParam String sourceIp,
@RequestParam String sourcePort,
@RequestParam String database) {
List<String> tableList = databaseSyncService.getTableListByDb(sourceIp, sourcePort, username, password, database);
return StringUtils.join(tableList, " ");
}
......@@ -123,8 +125,9 @@ public class DbSyncController {
* @return
*/
@GetMapping("/dbList")
public String getDbListForSync() {
List<String> dbList = databaseSyncService.getDatabaseList(ip, port, username, password);
public String getDbListForSync(@RequestParam String sourceIp,
@RequestParam String sourcePort) {
List<String> dbList = databaseSyncService.getDatabaseList(sourceIp, sourcePort, username, password);
return StringUtils.join(dbList, " ");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment