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 a9499218f1
commit 680fd15509
1 changed files with 2 additions and 0 deletions

View File

@ -858,6 +858,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());
apiTestCaseWithBLOBs.setVersionId(apiDefinition.getVersionId());
if (apiTestCaseWithBLOBs.getCreateTime() == null) {
apiTestCaseWithBLOBs.setCreateTime(System.currentTimeMillis());