fix: 修复首页定时任务通知 --bug=1006010 --user=刘瑞斌 【消息通知】接口测试... https://www.tapd.cn/55049933/s/1040372
This commit is contained in:
parent
a5de0b85db
commit
0684fe6312
|
@ -365,7 +365,6 @@ public class APITestController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/schedule/updateEnableByPrimyKey")
|
@PostMapping(value = "/schedule/updateEnableByPrimyKey")
|
||||||
@SendNotice(taskType = NoticeConstants.TaskType.API_HOME_TASK, event = NoticeConstants.Event.CLOSE_SCHEDULE, mailTemplate = "api/ScheduleClose", subject = "接口测试通知")
|
|
||||||
public Schedule updateScheduleEnableByPrimyKey(@RequestBody ScheduleInfoRequest request) {
|
public Schedule updateScheduleEnableByPrimyKey(@RequestBody ScheduleInfoRequest request) {
|
||||||
Schedule schedule = scheduleService.getSchedule(request.getTaskID());
|
Schedule schedule = scheduleService.getSchedule(request.getTaskID());
|
||||||
schedule.setEnable(request.isEnable());
|
schedule.setEnable(request.isEnable());
|
||||||
|
@ -373,6 +372,15 @@ public class APITestController {
|
||||||
return schedule;
|
return schedule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/schedule/updateEnableByPrimyKey/disable")
|
||||||
|
@SendNotice(taskType = NoticeConstants.TaskType.API_HOME_TASK, event = NoticeConstants.Event.CLOSE_SCHEDULE, mailTemplate = "api/ScheduleClose", subject = "接口测试通知")
|
||||||
|
public Schedule disableSchedule(@RequestBody ScheduleInfoRequest request) {
|
||||||
|
Schedule schedule = scheduleService.getSchedule(request.getTaskID());
|
||||||
|
schedule.setEnable(false);
|
||||||
|
apiAutomationService.updateSchedule(schedule);
|
||||||
|
return schedule;
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/historicalDataUpgrade")
|
@PostMapping(value = "/historicalDataUpgrade")
|
||||||
public String historicalDataUpgrade(@RequestBody SaveHistoricalDataUpgrade request) {
|
public String historicalDataUpgrade(@RequestBody SaveHistoricalDataUpgrade request) {
|
||||||
return historicalDataUpgradeService.upgrade(request);
|
return historicalDataUpgradeService.upgrade(request);
|
||||||
|
|
|
@ -234,11 +234,19 @@ public class TestPlanController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/schedule/updateEnableByPrimyKey")
|
@PostMapping(value = "/schedule/updateEnableByPrimyKey")
|
||||||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_HOME_TASK, event = NoticeConstants.Event.CLOSE_SCHEDULE, mailTemplate = "track/ScheduleClose", subject = "测试跟踪通知")
|
|
||||||
public Schedule updateScheduleEnableByPrimyKey(@RequestBody ScheduleInfoRequest request) {
|
public Schedule updateScheduleEnableByPrimyKey(@RequestBody ScheduleInfoRequest request) {
|
||||||
Schedule schedule = scheduleService.getSchedule(request.getTaskID());
|
Schedule schedule = scheduleService.getSchedule(request.getTaskID());
|
||||||
schedule.setEnable(request.isEnable());
|
schedule.setEnable(request.isEnable());
|
||||||
apiAutomationService.updateSchedule(schedule);
|
apiAutomationService.updateSchedule(schedule);
|
||||||
return schedule;
|
return schedule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/schedule/updateEnableByPrimyKey/disable")
|
||||||
|
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_HOME_TASK, event = NoticeConstants.Event.CLOSE_SCHEDULE, mailTemplate = "track/ScheduleClose", subject = "测试跟踪通知")
|
||||||
|
public Schedule disableSchedule(@RequestBody ScheduleInfoRequest request) {
|
||||||
|
Schedule schedule = scheduleService.getSchedule(request.getTaskID());
|
||||||
|
schedule.setEnable(false);
|
||||||
|
apiAutomationService.updateSchedule(schedule);
|
||||||
|
return schedule;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ export default {
|
||||||
|
|
||||||
updateTask(taskRow){
|
updateTask(taskRow){
|
||||||
|
|
||||||
this.result = this.$post('/api/schedule/updateEnableByPrimyKey', taskRow, response => {
|
this.result = this.$post('/api/schedule/updateEnableByPrimyKey/disable', taskRow, response => {
|
||||||
this.search();
|
this.search();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -146,7 +146,7 @@ export default {
|
||||||
|
|
||||||
updateTask(taskRow){
|
updateTask(taskRow){
|
||||||
|
|
||||||
this.result = this.$post('/test/plan/schedule/updateEnableByPrimyKey', taskRow, response => {
|
this.result = this.$post('/test/plan/schedule/updateEnableByPrimyKey/disable', taskRow, response => {
|
||||||
this.search();
|
this.search();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue