|
@@ -77,29 +77,31 @@ public class HandleReportController {
|
|
|
* @return
|
|
|
*/
|
|
|
// @ResponseBody
|
|
|
-// @RequestMapping(value = "/api/generate/report/order/{orderId}/owner/{ownerId}", method = RequestMethod.POST)
|
|
|
+// @RequestMapping(value = "/api/report/generate/order/{orderId}/owner/{ownerId}/reportType/{reportType}", method = RequestMethod.POST)
|
|
|
// public Map handleReport(@PathVariable(value = "orderId") Long orderId,
|
|
|
-// @PathVariable(value = "ownerId") Long ownerId, @RequestBody VulReportDataVO vulReportDataVO) {
|
|
|
- @ResponseBody
|
|
|
+// @PathVariable(value = "ownerId") Long ownerId,
|
|
|
+// @PathVariable(value = "reportType") String reportType) {
|
|
|
+// @ResponseBody
|
|
|
@RequestMapping(value = "/api/report/generate/order/{orderId}/owner/{ownerId}/reportType/{reportType}", method = RequestMethod.POST)
|
|
|
public Map handleReport(@PathVariable(value = "orderId") Long orderId,
|
|
|
@PathVariable(value = "ownerId") Long ownerId,
|
|
|
- @PathVariable(value = "reportType") String reportType) {
|
|
|
- List<String> menus = new ArrayList<>();
|
|
|
- menus.add("APK扫描");
|
|
|
- ProjectInfoVO projectInfoVO = new ProjectInfoVO();
|
|
|
- projectInfoVO.setCostTime("2019/11/15");
|
|
|
- projectInfoVO.setProjectName("途牛APP");
|
|
|
- projectInfoVO.setStartTime(new Timestamp(new Date().getTime()));
|
|
|
- projectInfoVO.setUserName("郭超");
|
|
|
- List<VulnerabilityVo> vulnerabilityVos = new ArrayList<>();
|
|
|
- VulStatisticsVO vulStatisticsVO = new VulStatisticsVO();
|
|
|
-
|
|
|
- VulReportDataVO vulReportDataVO = new VulReportDataVO();
|
|
|
- vulReportDataVO.setMenus(menus);
|
|
|
- vulReportDataVO.setProjectInfo(projectInfoVO);
|
|
|
- vulReportDataVO.setVulnerability(vulnerabilityVos);
|
|
|
- vulReportDataVO.setVulStatistics(vulStatisticsVO);
|
|
|
+ @PathVariable(value = "reportType") String reportType,
|
|
|
+ @RequestBody VulReportDataVO vulReportDataVO) {
|
|
|
+// List<String> menus = new ArrayList<>();
|
|
|
+// menus.add("APK扫描");
|
|
|
+// ProjectInfoVO projectInfoVO = new ProjectInfoVO();
|
|
|
+// projectInfoVO.setCostTime("2019/11/15");
|
|
|
+// projectInfoVO.setProjectName("途牛APP");
|
|
|
+// projectInfoVO.setStartTime(new Timestamp(new Date().getTime()));
|
|
|
+// projectInfoVO.setUserName("郭超");
|
|
|
+// List<VulnerabilityVo> vulnerabilityVos = new ArrayList<>();
|
|
|
+// VulStatisticsVO vulStatisticsVO = new VulStatisticsVO();
|
|
|
+//
|
|
|
+// VulReportDataVO vulReportDataVO = new VulReportDataVO();
|
|
|
+// vulReportDataVO.setMenus(menus);
|
|
|
+// vulReportDataVO.setProjectInfo(projectInfoVO);
|
|
|
+// vulReportDataVO.setVulnerability(vulnerabilityVos);
|
|
|
+// vulReportDataVO.setVulStatistics(vulStatisticsVO);
|
|
|
|
|
|
Future<String> stringFuture = autoReportProductService.generateReport(orderId, ownerId, vulReportDataVO, reportType);
|
|
|
System.out.println(stringFuture.toString());
|