fix: 删除测试时删除定时任务
This commit is contained in:
parent
0b03cd128f
commit
1637dd53cf
|
@ -140,6 +140,7 @@ public class APITestService {
|
||||||
testCaseService.checkIsRelateTest(testId);
|
testCaseService.checkIsRelateTest(testId);
|
||||||
deleteFileByTestId(testId);
|
deleteFileByTestId(testId);
|
||||||
apiReportService.deleteByTestId(testId);
|
apiReportService.deleteByTestId(testId);
|
||||||
|
scheduleService.deleteByResourceId(testId);
|
||||||
apiTestMapper.deleteByPrimaryKey(testId);
|
apiTestMapper.deleteByPrimaryKey(testId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,9 @@ public class PerformanceTestService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//delete schedule
|
||||||
|
scheduleService.deleteByResourceId(testId);
|
||||||
|
|
||||||
// delete load_test
|
// delete load_test
|
||||||
loadTestMapper.deleteByPrimaryKey(request.getId());
|
loadTestMapper.deleteByPrimaryKey(request.getId());
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,12 @@ public class ScheduleService {
|
||||||
return scheduleMapper.deleteByPrimaryKey(scheduleId);
|
return scheduleMapper.deleteByPrimaryKey(scheduleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int deleteByResourceId(String resourceId) {
|
||||||
|
ScheduleExample scheduleExample = new ScheduleExample();
|
||||||
|
scheduleExample.createCriteria().andResourceIdEqualTo(resourceId);
|
||||||
|
return scheduleMapper.deleteByExample(scheduleExample);
|
||||||
|
}
|
||||||
|
|
||||||
public List<Schedule> listSchedule() {
|
public List<Schedule> listSchedule() {
|
||||||
ScheduleExample example = new ScheduleExample();
|
ScheduleExample example = new ScheduleExample();
|
||||||
return scheduleMapper.selectByExample(example);
|
return scheduleMapper.selectByExample(example);
|
||||||
|
|
Loading…
Reference in New Issue