fix(接口测试): 修复导入的case的request的项目id不是当前项目id的缺陷
--bug=1028195 --user=王孝刚 【接口测试】新建api-新建case-导出-导入到其他项目-case添加前后置sql-环境显示为导出项目环境 https://www.tapd.cn/55049933/s/1400900
This commit is contained in:
parent
5eb79bab0d
commit
b0371abe56
|
@ -848,6 +848,11 @@ public class ApiDefinitionImportUtilService {
|
|||
apiTestCaseWithBLOBs.setCreateUserId(Objects.requireNonNull(SessionUtils.getUser()).getId());
|
||||
apiTestCaseWithBLOBs.setUpdateUserId(Objects.requireNonNull(SessionUtils.getUser()).getId());
|
||||
apiTestCaseWithBLOBs.setCreateTime(System.currentTimeMillis());
|
||||
JSONObject o = JSONUtil.parseObject(apiTestCaseWithBLOBs.getRequest());
|
||||
if (o != null) {
|
||||
o.put("projectId", apiTestCaseWithBLOBs.getProjectId());
|
||||
apiTestCaseWithBLOBs.setRequest(o.toString());
|
||||
}
|
||||
BeanUtils.copyBean(apiTestCaseDTO, apiTestCaseWithBLOBs);
|
||||
apiTestCaseDTO.setUpdated(false);
|
||||
apiTestCaseMapper.insert(apiTestCaseWithBLOBs);
|
||||
|
|
|
@ -991,6 +991,7 @@ export default {
|
|||
this.apiCase.request.headers = [];
|
||||
this.apiCase.request.headers.push(new KeyValue({ enable: true, name: '', value: '' }));
|
||||
}
|
||||
this.apiCase.request.projectId = this.apiCase.projectId;
|
||||
if (this.apiCase.request.hashTree) {
|
||||
this.initStepSize(this.apiCase.request.hashTree);
|
||||
this.historicalDataProcessing(this.apiCase.request.hashTree);
|
||||
|
|
Loading…
Reference in New Issue