fix(接口自动化): 修复数据迁移,sql类型数据源丢失问题

This commit is contained in:
fit2-zhao 2021-01-06 18:34:17 +08:00
parent d1c179fc5c
commit 4dfaa1c463
1 changed files with 2 additions and 3 deletions

View File

@ -122,9 +122,8 @@ public class HistoricalDataUpgradeService {
element.setType("DubboSampler");
}
if (request instanceof SqlRequest) {
element = new MsJDBCSampler();
SqlRequest request1 = (SqlRequest) request;
BeanUtils.copyBean(element, request1);
String requestJson = JSON.toJSONString(request);
element = JSON.parseObject(requestJson, MsJDBCSampler.class);
element.setType("JDBCSampler");
}
if (request instanceof TCPRequest) {