fix(接口测试): 修复导入ms格式的带用例的接口定义,用例的创建人不是导入用户

--user=郭雨琦
--bug=1015673
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015673
This commit is contained in:
guoyuqi 2022-08-05 11:17:57 +08:00 committed by xiaomeinvG
parent c645d4752c
commit 3e85bed1c0
1 changed files with 2 additions and 0 deletions

View File

@ -992,6 +992,8 @@ public class ApiDefinitionService {
for (int i = 0; i < caseList.size(); i++) {
ApiTestCaseWithBLOBs apiTestCaseWithBLOBs = caseList.get(i);
apiTestCaseWithBLOBs.setApiDefinitionId(apiDefinition.getId());
apiTestCaseWithBLOBs.setCreateUserId(Objects.requireNonNull(SessionUtils.getUser()).getId());
apiTestCaseWithBLOBs.setUpdateUserId(Objects.requireNonNull(SessionUtils.getUser()).getId());
if (apiDefinition.getToBeUpdated() != null && !apiTestCaseWithBLOBs.getVersionId().equals("cover")) {
apiTestCaseWithBLOBs.setToBeUpdated(true);
//TODO:check setting