Commit 3d97b5f9 authored by 黎博's avatar 黎博

修改sql执行接口地址

parent 16f2def0
......@@ -168,13 +168,15 @@ public class AutoUtilsServiceImpl implements AutoUtilsService {
params.put("database", db);
params.put("sql", sql);
params.put("type", type);
String url = "http://localhost:8082/sql/execute";
String url = "https://qa-platform-yxm.liangkebang.net/sql/execute";
String result = HttpClientUtils.doGet(url, params);
// String redisKey = uuid + "_" + key;
// redisUtils.set(redisKey, JsonPath.read("$.data", result));
// redisUtils.expire(redisKey, 120);
// 只有select才需要加入Map
if (sql.startsWith("select") || sql.startsWith("SELECT")) {
resultMap.put(key, JsonPath.read(result, "$.data." + key));
if (type.equals("map")) {
resultMap.put(key, JsonPath.read(result, "$.data." + key));
} else if (type.equals("list")) {
resultMap.put(key, JsonPath.read(result, "$.data."));
}
}
}
return resultMap;
......
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