diff --git a/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java b/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java index f51ddd54..1130c76b 100644 --- a/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java +++ b/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java @@ -100,11 +100,26 @@ public class PqDevController extends BaseController { } @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD) - @GetMapping("/image/download") + @GetMapping("/image/preview") @ApiOperation("下载设备图片") @ApiImplicitParam(name = "id", value = "被检设备id", required = true) - public void downloadImage(@RequestParam("id") String id, HttpServletResponse response) { - pqDevService.downloadImage(id, response); + public void previewImage(@RequestParam("id") String id, + @RequestParam("fileName") String fileName, + HttpServletResponse response) { + pqDevService.previewImage(id, fileName, response); + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD) + @GetMapping("/image/download") + @ApiOperation("download device image") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "id", required = true), + @ApiImplicitParam(name = "fileName", value = "fileName", required = true) + }) + public void downloadImage(@RequestParam("id") String id, + @RequestParam("fileName") String fileName, + HttpServletResponse response) { + pqDevService.downloadImage(id, fileName, response); } @OperateInfo(operateType = OperateType.DELETE) diff --git a/detection/src/main/java/com/njcn/gather/device/mapper/mapping/PqDevMapper.xml b/detection/src/main/java/com/njcn/gather/device/mapper/mapping/PqDevMapper.xml index bee3f825..7508a3d0 100644 --- a/detection/src/main/java/com/njcn/gather/device/mapper/mapping/PqDevMapper.xml +++ b/detection/src/main/java/com/njcn/gather/device/mapper/mapping/PqDevMapper.xml @@ -154,7 +154,7 @@