diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionImportUtilService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionImportUtilService.java index 91f45cc8ac..9957b63e6e 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionImportUtilService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionImportUtilService.java @@ -298,13 +298,13 @@ public class ApiDefinitionImportUtilService { List operationLogs = new ArrayList<>(); List updateRequestData = apiDetailWithDataUpdate.getUpdateRequestData(); updateRequestData.forEach(t -> { + ApiDefinition apiDefinition = new ApiDefinition(); if (CollectionUtils.isNotEmpty(updateModuleLists) && updateModuleLists.contains(t.getId())) { - ApiDefinition apiDefinition = new ApiDefinition(); apiDefinition.setId(t.getId()); apiDefinition.setUpdateUser(request.getUserId()); - apiDefinition.setUpdateTime(System.currentTimeMillis()); - apiMapper.updateByPrimaryKeySelective(apiDefinition); } + apiDefinition.setUpdateTime(System.currentTimeMillis()); + apiMapper.updateByPrimaryKeySelective(apiDefinition); //更新blob数据 ApiDefinitionBlob apiDefinitionBlob = new ApiDefinitionBlob(); apiDefinitionBlob.setId(t.getId());