写死数据更改

This commit is contained in:
even 2025-08-01 14:55:39 +08:00
parent 4128ab40ea
commit 28328ba723
7 changed files with 9 additions and 7 deletions

View File

@ -181,7 +181,7 @@ public class AFLWorker extends DockerWorker {
crashesSaveReq.setInstanceId(pipPipelineHisInstance.getId()); crashesSaveReq.setInstanceId(pipPipelineHisInstance.getId());
crashesSaveReq.setTaskId(taskId); crashesSaveReq.setTaskId(taskId);
crashesSaveReq.setTaskType("AFL"); crashesSaveReq.setTaskType("AFL");
crashesSaveReq.setCity("长沙");// 暂时空置 crashesSaveReq.setCity("长沙");// 暂时空置
crashesSaveReq.setTargetType(pipeline.getTargetType()); crashesSaveReq.setTargetType(pipeline.getTargetType());
crashesSaveReq.setTargetName(targetVersion.getFileName()); crashesSaveReq.setTargetName(targetVersion.getFileName());
localAflCrashesService.saveLocalAflCrashesInfo(crashesSaveReq); localAflCrashesService.saveLocalAflCrashesInfo(crashesSaveReq);

View File

@ -124,7 +124,7 @@ public class ApplicationWorker extends HttpWorker {
postHandlerManager.registerPostHandler(new ExecuteTaskPostHandler(pipTask.getId(),pipelineId) { postHandlerManager.registerPostHandler(new ExecuteTaskPostHandler(pipTask.getId(),pipelineId) {
@Override @Override
public void executeAfterDone(PipPipelineHisInstance pipPipelineHisInstance) { public void executeAfterDone(PipPipelineHisInstance pipPipelineHisInstance) {
vulInfoService.scaToVulInfoSave(scaTaskId,pipeline.getTargetType(),fileName,"长沙",pipPipelineHisInstance.getId(),taskId,"APPLICATION"); vulInfoService.scaToVulInfoSave(scaTaskId,pipeline.getTargetType(),fileName,"长沙",pipPipelineHisInstance.getId(),taskId,"APPLICATION");
} }
}); });
} }

View File

@ -126,7 +126,7 @@ public class ScaBinaryWorker extends HttpWorker {
postHandlerManager.registerPostHandler(new ExecuteTaskPostHandler(pipTask.getId(),pipelineId) { postHandlerManager.registerPostHandler(new ExecuteTaskPostHandler(pipTask.getId(),pipelineId) {
@Override @Override
public void executeAfterDone(PipPipelineHisInstance pipPipelineHisInstance) { public void executeAfterDone(PipPipelineHisInstance pipPipelineHisInstance) {
vulInfoService.scaToVulInfoSave(scaTaskId,pipeline.getTargetType(),fileName,"长沙",pipPipelineHisInstance.getId(),taskId,"BINARY"); vulInfoService.scaToVulInfoSave(scaTaskId,pipeline.getTargetType(),fileName,"长沙",pipPipelineHisInstance.getId(),taskId,"BINARY");
} }
}); });
} }

View File

@ -124,7 +124,7 @@ public class ScaMirrorWorker extends HttpWorker {
postHandlerManager.registerPostHandler(new ExecuteTaskPostHandler(pipTask.getId(),pipelineId) { postHandlerManager.registerPostHandler(new ExecuteTaskPostHandler(pipTask.getId(),pipelineId) {
@Override @Override
public void executeAfterDone(PipPipelineHisInstance pipPipelineHisInstance) { public void executeAfterDone(PipPipelineHisInstance pipPipelineHisInstance) {
vulInfoService.scaToVulInfoSave(scaTaskId,pipeline.getTargetType(),fileName,"长沙",pipPipelineHisInstance.getId(),taskId,"MIRROR"); vulInfoService.scaToVulInfoSave(scaTaskId,pipeline.getTargetType(),fileName,"长沙",pipPipelineHisInstance.getId(),taskId,"MIRROR");
} }
}); });
} }

View File

@ -122,7 +122,7 @@ public class ScaSbomWorker extends HttpWorker {
postHandlerManager.registerPostHandler(new ExecuteTaskPostHandler(pipTask.getId(),pipelineId) { postHandlerManager.registerPostHandler(new ExecuteTaskPostHandler(pipTask.getId(),pipelineId) {
@Override @Override
public void executeAfterDone(PipPipelineHisInstance pipPipelineHisInstance) { public void executeAfterDone(PipPipelineHisInstance pipPipelineHisInstance) {
vulInfoService.scaToVulInfoSave(scaTaskId,pipeline.getTargetType(),fileName,"长沙",pipPipelineHisInstance.getId(),taskId,"SCA_S_BOM"); vulInfoService.scaToVulInfoSave(scaTaskId,pipeline.getTargetType(),fileName,"长沙",pipPipelineHisInstance.getId(),taskId,"SCA_S_BOM");
} }
}); });
} }

View File

@ -129,7 +129,9 @@ public class DataAnalysisServiceImpl implements DataAnalysisService {
if (Objects.nonNull(city)) { if (Objects.nonNull(city)) {
city = Optional.ofNullable(provinceCapitalMap.get(city)).orElse(city); city = Optional.ofNullable(provinceCapitalMap.get(city)).orElse(city);
} }
return vulInfoDao.selectList(new QueryWrapper<VulInfo>().lambda().eq(Objects.nonNull(city),VulInfo::getCity,city).orderByDesc(VulInfo::getCreateTime)); LambdaQueryWrapper<VulInfo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Objects.nonNull(city),VulInfo::getCity,city).orderByDesc(VulInfo::getCreateTime).last("LIMIT 10");
return vulInfoDao.selectList(wrapper);
} }
@Override @Override

View File

@ -49,7 +49,7 @@ public class VulInfoTest {
String targetType = PipelineTargetTypeConstant.SOURCE_CODE; String targetType = PipelineTargetTypeConstant.SOURCE_CODE;
Integer scaTaskId = 681; Integer scaTaskId = 681;
String targetName="测试目标名称"; String targetName="测试目标名称";
String city = "长沙"; String city = "长沙";
String instanceId = "instanceId"; String instanceId = "instanceId";
String taskId = "taskId"; String taskId = "taskId";
String taskType ="taskType"; String taskType ="taskType";