diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index 870ed44bea..5dee4cf877 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -163,7 +163,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl apiReportService.complete(testResult, report); } else if (StringUtils.equals(this.runMode, ApiRunMode.DELIMIT.name())) { // 调试操作,不需要存储结果 - if (!StringUtils.isBlank(debugReportId)) { + if (StringUtils.isBlank(debugReportId)) { apiDefinitionService.addResult(testResult); } else { apiDefinitionService.addResult(testResult); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index 78875cf026..76b3ad3442 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -486,10 +486,7 @@ public class ApiTestCaseService { } public String getExecResult(String id){ - ApiDefinitionExecResultExample apidefinitionexecresultexample = new ApiDefinitionExecResultExample(); - ApiDefinitionExecResultExample.Criteria criteria = apidefinitionexecresultexample.createCriteria(); - criteria.andResourceIdEqualTo(id); - String status=apiDefinitionExecResultMapper.selectByExample(apidefinitionexecresultexample).get(0).getStatus(); + String status=apiDefinitionExecResultMapper.selectExecResult(id); return status; } } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java index 174b87cc6d..c7c7ff5c38 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java @@ -33,4 +33,6 @@ public interface ApiDefinitionExecResultMapper { int updateByPrimaryKeyWithBLOBs(ApiDefinitionExecResult record); int updateByPrimaryKey(ApiDefinitionExecResult record); + + String selectExecResult(String resourceId); } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.xml index d9592dfa3a..4e2443f552 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.xml @@ -210,6 +210,9 @@ + update api_definition_exec_result diff --git a/frontend/src/business/components/api/definition/components/import/ApiImport.vue b/frontend/src/business/components/api/definition/components/import/ApiImport.vue index 416619781e..ba08997b69 100644 --- a/frontend/src/business/components/api/definition/components/import/ApiImport.vue +++ b/frontend/src/business/components/api/definition/components/import/ApiImport.vue @@ -3,17 +3,17 @@ :visible.sync="visible" class="api-import" v-loading="result.loading" @close="close">
-
{{$t('api_test.api_import.data_format')}}
+
{{ $t('api_test.api_import.data_format') }}
- {{item.name}} + {{ item.name }}
- {{$t('commons.save')}} + {{ $t('commons.save') }} - {{$t('commons.cancel')}} + {{ $t('commons.cancel') }}
@@ -34,7 +34,7 @@ multiple>
-
{{$t('api_test.api_import.file_size_limit')}}
+
{{ $t('api_test.api_import.file_size_limit') }}
@@ -47,15 +47,29 @@ :active-text="$t('api_test.api_import.swagger_url_import')"> + + + + + {{ $t('api_test.api_import.next_synchronization_time') }}: + + + +
- {{$t('api_test.api_import.tip')}}:{{selectedPlatform.tip}} + {{ $t('api_test.api_import.tip') }}:{{ selectedPlatform.tip }}
- {{$t('api_test.api_import.export_tip')}}:{{selectedPlatform.exportTip}} + {{ $t('api_test.api_import.export_tip') }}:{{ selectedPlatform.exportTip }}
@@ -63,217 +77,223 @@ diff --git a/frontend/src/business/components/api/definition/components/import/ImportScheduleEdit.vue b/frontend/src/business/components/api/definition/components/import/ImportScheduleEdit.vue new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 0a040ccbdc..a130114e35 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -826,6 +826,9 @@ export default { swagger_export_tip: "Export jSON-formatted files via Swagger website", suffixFormatErr: "The file format does not meet the requirements", swagger_url_import: "Import using URL", + timing_synchronization:"Timing synchronization", + next_synchronization_time:"Next synchronization time", + }, home_page: { unit_of_measurement: "", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index f507566fde..3e4b8690ac 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -827,6 +827,10 @@ export default { swagger_export_tip: "通过 Swagger 页面导出", suffixFormatErr: "文件格式不符合要求", swagger_url_import: "使用URL导入", + timing_synchronization:"定时同步", + next_synchronization_time:"下次同步时间" + + }, home_page: { unit_of_measurement: "个", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 551d04bc7e..bf03c3aa7e 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -827,6 +827,9 @@ export default { swagger_export_tip: "通過 Swagger 頁面導出", suffixFormatErr: "文件格式不符合要求", swagger_url_import: "使用URL導入", + timing_synchronization:"定時同步", + next_synchronization_time:"下次同步時間", + }, home_page: { unit_of_measurement: "個",