fix(接口测试): 修复批量删除场景报告有时候无法生成日志的缺陷
--bug=1038891 --user=王孝刚 【接口测试】批量删除场景报告-未生成系统日志 https://www.tapd.cn/55049933/s/1492044
This commit is contained in:
parent
440214b67a
commit
dfe1d66e62
|
@ -17,7 +17,7 @@ public interface ExtApiReportMapper {
|
|||
|
||||
List<String> getIds(@Param("request") ApiReportBatchRequest request);
|
||||
|
||||
List<ApiReport> selectApiReportByIds(@Param("ids") List<String> ids, @Param("deleted") boolean deleted);
|
||||
List<ApiReport> selectApiReportByIds(@Param("ids") List<String> ids);
|
||||
|
||||
List<ApiReportStepDTO> selectStepsByReportId(String id);
|
||||
|
||||
|
|
|
@ -61,8 +61,7 @@
|
|||
select
|
||||
api_report.id,
|
||||
api_report.name
|
||||
from api_report where api_report.deleted = #{deleted}
|
||||
and api_report.test_plan_id = 'NONE'
|
||||
from api_report where api_report.test_plan_id = 'NONE'
|
||||
and api_report.id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
|
|
|
@ -18,7 +18,7 @@ public interface ExtApiScenarioReportMapper {
|
|||
|
||||
List<String> getIds(@Param("request") ApiReportBatchRequest request);
|
||||
|
||||
List<ApiScenarioReport> selectApiReportByIds(@Param("ids") List<String> ids, @Param("deleted") boolean deleted);
|
||||
List<ApiScenarioReport> selectApiReportByIds(@Param("ids") List<String> ids);
|
||||
|
||||
List<ApiScenarioReportStepDTO> selectStepByReportId(@Param("reportId") String reportId);
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
select
|
||||
api_scenario_report.id,
|
||||
api_scenario_report.name
|
||||
from api_scenario_report where api_scenario_report.deleted = #{deleted}
|
||||
and api_scenario_report.test_plan_id = 'NONE'
|
||||
from api_scenario_report where
|
||||
api_scenario_report.test_plan_id = 'NONE'
|
||||
and api_scenario_report.id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class ApiReportLogService {
|
|||
|
||||
public void batchDeleteLog(List<String> ids, String userId, String projectId) {
|
||||
Project project = projectMapper.selectByPrimaryKey(projectId);
|
||||
List<ApiReport> apiReports = extApiReportMapper.selectApiReportByIds(ids, true);
|
||||
List<ApiReport> apiReports = extApiReportMapper.selectApiReportByIds(ids);
|
||||
List<LogDTO> logs = new ArrayList<>();
|
||||
apiReports.forEach(apiReport -> {
|
||||
LogDTO dto = new LogDTO(
|
||||
|
|
|
@ -151,7 +151,7 @@ public class ApiReportService {
|
|||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return;
|
||||
}
|
||||
SubListUtils.dealForSubList(ids, 2000, subList -> {
|
||||
SubListUtils.dealForSubList(ids, 500, subList -> {
|
||||
ApiReportExample example = new ApiReportExample();
|
||||
example.createCriteria().andIdIn(subList);
|
||||
ApiReport apiReport = new ApiReport();
|
||||
|
|
|
@ -70,7 +70,7 @@ public class ApiScenarioReportLogService {
|
|||
@Async
|
||||
public void batchDeleteLog(List<String> ids, String userId, String projectId) {
|
||||
Project project = projectMapper.selectByPrimaryKey(projectId);
|
||||
List<ApiScenarioReport> apiReports = extApiScenarioReportMapper.selectApiReportByIds(ids, true);
|
||||
List<ApiScenarioReport> apiReports = extApiScenarioReportMapper.selectApiReportByIds(ids);
|
||||
List<LogDTO> logs = new ArrayList<>();
|
||||
apiReports.forEach(apiReport -> {
|
||||
LogDTO dto = new LogDTO(
|
||||
|
|
|
@ -32,7 +32,7 @@ public class TaskCenterController {
|
|||
|
||||
@PostMapping("/project/schedule/page")
|
||||
@Operation(summary = "项目-任务中心-定时任务列表")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_ORGANIZATION_PROJECT_READ)
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_BASE_INFO_READ)
|
||||
public Pager<List<TaskCenterScheduleDTO>> projectScheduleList(@Validated @RequestBody TaskCenterSchedulePageRequest request) {
|
||||
return taskCenterService.getProjectSchedulePage(request, SessionUtils.getCurrentProjectId());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue