fix: swagger定时任务优化

This commit is contained in:
chenjianxing 2021-06-21 20:19:09 +08:00 committed by jianxing
parent a4545cefef
commit d09e42708f
5 changed files with 10 additions and 9 deletions

View File

@ -968,7 +968,7 @@ public class ApiDefinitionService {
//删除
public void deleteSchedule(ScheduleRequest request) {
swaggerUrlProjectMapper.deleteByPrimaryKey(request.getId());
scheduleService.deleteByResourceId(request.getTaskId(), ScheduleGroup.SWAGGER_IMPORT.name());
scheduleService.deleteByResourceId(request.getId(), ScheduleGroup.SWAGGER_IMPORT.name());
}
//查询swaggerUrl详情

View File

@ -13,7 +13,7 @@
@setModuleOptions="setModuleOptions"
@setNodeTree="setNodeTree"
@enableTrash="enableTrash"
@schedule="handleTabsEdit($t('api_test.definition.request.fast_debug'), 'SCHEDULE')"
@schedule="handleTabsEdit($t('api_test.api_import.timing_synchronization'), 'SCHEDULE')"
:type="'edit'"
page-source="definition"
ref="nodeTree"/>
@ -177,7 +177,6 @@ import ApiCaseSimpleList from "./components/list/ApiCaseSimpleList";
import ApiDocumentsPage from "@/business/components/api/definition/components/list/ApiDocumentsPage";
import MsTableButton from "@/business/components/common/components/MsTableButton";
import MsTabButton from "@/business/components/common/components/MsTabButton";
import {getLabel} from "@/common/js/tableUtils";
import MockConfig from "@/business/components/api/definition/components/mock/MockConfig";
import ApiSchedule from "@/business/components/api/definition/components/import/ApiSchedule";

View File

@ -53,6 +53,7 @@
<div class="task-list">
<swagger-task-list
@clear="clear"
@rowClick="handleRowClick"
ref="taskList"/>
</div>

View File

@ -106,6 +106,7 @@ export default {
deleteRowTask(row) {
this.result = this.$post('/api/definition/schedule/delete', row, response => {
this.search();
this.$emit('clear');
});
}

View File

@ -61,17 +61,17 @@ export default {
permissions: ['PROJECT_API_DEFINITION:READ+DEBUG']
},
{
label: this.$t('api_test.api_import.label'),
callback: this.handleImport,
permissions: ['PROJECT_API_DEFINITION:READ+IMPORT_API']
},
{
label: this.$t('定时同步'),
label: this.$t('api_test.api_import.timing_synchronization'),
callback: () => {
this.$emit('schedule');
},
permissions: ['PROJECT_API_DEFINITION:READ+IMPORT_API']
},
{
label: this.$t('api_test.api_import.label'),
callback: this.handleImport,
permissions: ['PROJECT_API_DEFINITION:READ+IMPORT_API']
},
{
label: this.$t('report.export'),
permissions: ['PROJECT_API_DEFINITION:READ+EXPORT_API'],