Commit b8b18a52 authored by 黎博's avatar 黎博

qa-platform域名换到apollo配置

parent 41d98087
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
......@@ -60,6 +61,9 @@ public class PipelineController {
@Autowired
JenkinsService jenkinsService;
@Value("${qa-platform.https}")
private String qaPlatformHost;
/**
* gitlab webhook
* @param request
......@@ -176,7 +180,7 @@ public class PipelineController {
// 开始循环执行SQL
String database = submitTestInstruction.getDatabase();
List<Map> databaseMapList = JSONArray.parseArray(database, Map.class);
String sqlExecUrl = "https://qa-platform.liangkebang.com/sql/execute";
String sqlExecUrl = qaPlatformHost + "/sql/execute";
Map<String, String> sqlExecParams = new HashMap<>();
sqlExecParams.put("namespace", dingRobot.getNamespace());
for (Map map: databaseMapList) {
......
......@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSON;
import com.jayway.jsonpath.JsonPath;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.HashMap;
......@@ -27,6 +28,9 @@ public class AutoUtilsServiceImpl implements AutoUtilsService {
@Autowired
RedisUtils redisUtils;
@Value("${qa-platform.https}")
private String qaPlatformHost;
/**
* 参数替换-新
* @param parameters headers或者parameters
......@@ -191,7 +195,7 @@ public class AutoUtilsServiceImpl implements AutoUtilsService {
params.put("sql", sql);
params.put("type", type);
log.info("开始执行SQL:{}", sql);
String url = "https://qa-platform.liangkebang.com/sql/execute";
String url = qaPlatformHost + "/sql/execute";
String result = HttpClientUtils.doGet(url, params);
log.info("SQL返回结果:{}", result);
// 只有select才需要加入Map
......
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