Commit dbeedd9b authored by 黎博's avatar 黎博

bug fix

parent cd1a39af
......@@ -128,13 +128,14 @@ public class DbSyncController {
@GetMapping("/table/structure")
public JsonResult handleTableStructure(@RequestParam String targetIp, @RequestParam String targetPort, @RequestParam String database, @RequestParam String table) {
try {
log.info("开始同步表结构到测试环境,地址:{}:{}, 数据库:{}, 表:{}", targetIp, targetPort, database, table);
databaseSyncService.getSourceDbStructure(ip, port, username, password, database, table);
databaseSyncService.syncDbStructureToDest(targetIp, targetPort, "qa", "qatest", database, table);
} catch (Exception e) {
e.printStackTrace();
return JsonResult.buildErrorStateResult("创建表结构失败!", false);
}
return JsonResult.buildSuccessResult("创建" + ip + ":" + port + "环境表结构成功!");
return JsonResult.buildSuccessResult("创建" + targetIp + ":" + targetPort + "环境表结构成功!");
}
/**
......
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