fix(接口测试): 修复第三方工具调用MS导入接口的api时在登录项目与参数项目不一致时出现的用例所属项目错误的问题
--bug=1013492 --user=宋天阳 【接口测试】调用API导入接口定义时,附带的case导入到了错误的项目里 https://www.tapd.cn/55049933/s/1175055
This commit is contained in:
parent
b2caf9d799
commit
4636c693ce
|
@ -1177,7 +1177,11 @@ public class ApiDefinitionService {
|
|||
apiTestCase.setCreateTime(System.currentTimeMillis());
|
||||
apiTestCase.setUpdateTime(System.currentTimeMillis());
|
||||
apiTestCase.setCreateUserId(SessionUtils.getUserId());
|
||||
apiTestCase.setProjectId(SessionUtils.getCurrentProjectId());
|
||||
if (StringUtils.isEmpty(apiTestImportRequest.getProjectId())) {
|
||||
apiTestCase.setProjectId(SessionUtils.getCurrentProjectId());
|
||||
} else {
|
||||
apiTestCase.setProjectId(apiTestImportRequest.getProjectId());
|
||||
}
|
||||
apiTestCase.setOrder(getImportNextCaseOrder(apiTestImportRequest.getProjectId()));
|
||||
apiTestCaseMapper.insert(apiTestCase);
|
||||
} else if (StringUtils.equals("fullCoverage", apiTestImportRequest.getModeId())) {
|
||||
|
|
Loading…
Reference in New Issue