Merge remote-tracking branch 'origin/v1.1' into v1.1

This commit is contained in:
Captain.B 2020-07-23 10:05:33 +08:00
commit 6107789244
3 changed files with 10 additions and 0 deletions

View File

@ -138,6 +138,7 @@ public class APITestService {
testCaseService.checkIsRelateTest(testId);
deleteFileByTestId(testId);
apiReportService.deleteByTestId(testId);
scheduleService.deleteByResourceId(testId);
apiTestMapper.deleteByPrimaryKey(testId);
}

View File

@ -100,6 +100,9 @@ public class PerformanceTestService {
});
}
//delete schedule
scheduleService.deleteByResourceId(testId);
// delete load_test
loadTestMapper.deleteByPrimaryKey(request.getId());

View File

@ -55,6 +55,12 @@ public class ScheduleService {
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() {
ScheduleExample example = new ScheduleExample();
return scheduleMapper.selectByExample(example);