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

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

parent 6e68f512
...@@ -112,8 +112,10 @@ public class DbSyncController { ...@@ -112,8 +112,10 @@ public class DbSyncController {
* @return * @return
*/ */
@GetMapping("/tableList") @GetMapping("/tableList")
public String getTableListForSync(@RequestParam String database) { public String getTableListForSync(@RequestParam String sourceIp,
List<String> tableList = databaseSyncService.getTableListByDb(ip, port, username, password, database); @RequestParam String sourcePort,
@RequestParam String database) {
List<String> tableList = databaseSyncService.getTableListByDb(sourceIp, sourcePort, username, password, database);
return StringUtils.join(tableList, " "); return StringUtils.join(tableList, " ");
} }
...@@ -123,8 +125,9 @@ public class DbSyncController { ...@@ -123,8 +125,9 @@ public class DbSyncController {
* @return * @return
*/ */
@GetMapping("/dbList") @GetMapping("/dbList")
public String getDbListForSync() { public String getDbListForSync(@RequestParam String sourceIp,
List<String> dbList = databaseSyncService.getDatabaseList(ip, port, username, password); @RequestParam String sourcePort) {
List<String> dbList = databaseSyncService.getDatabaseList(sourceIp, sourcePort, username, password);
return StringUtils.join(dbList, " "); 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