From 7ee125c47965ed9d5ca0d21a022ed81d25ea08a5 Mon Sep 17 00:00:00 2001 From: ant Date: Mon, 3 Jun 2024 09:40:52 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=8E=BB=E9=99=A4oss=20=E4=B8=ADocr=20?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=83=A8=E5=88=86=202.=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oss/controller/FileController.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/chushang-modules/chushang-module-oss/oss-service/src/main/java/com/chushang/oss/controller/FileController.java b/chushang-modules/chushang-module-oss/oss-service/src/main/java/com/chushang/oss/controller/FileController.java index 5ac62d6..20edac1 100644 --- a/chushang-modules/chushang-module-oss/oss-service/src/main/java/com/chushang/oss/controller/FileController.java +++ b/chushang-modules/chushang-module-oss/oss-service/src/main/java/com/chushang/oss/controller/FileController.java @@ -22,8 +22,8 @@ public class FileController { @Resource FileSourceService fileSourceService; - @Resource - OcrService ocrService; +// @Resource +// OcrService ocrService; /** * todo @@ -33,18 +33,18 @@ public class FileController { public AjaxResult uploadFile(@RequestParam(value = "file") MultipartFile file, @RequestParam(value = "ocrType", required = false) String ocrType) { FileSourceVo vo = BeanUtil.copyProperties(fileSourceService.addFile(file, "ip"), FileSourceVo.class); - if (StrUtil.isNotEmpty(ocrType)) { - OcrDTO ocr = new OcrDTO(); - OcrTypeEnum ocrTypeEnum = OcrTypeEnum.findByCode(ocrType); - if (ocrTypeEnum != OcrTypeEnum.NONE) { - ocr.setOcrType(ocrTypeEnum); - ocr.setImgPath(vo.getFilePath()); - Result ocrInfo = ocrService.ocr(ocr); - if (ocrInfo.isSuccess()) { - vo.setOcr(ocrInfo.getData()); - } - } - } +// if (StrUtil.isNotEmpty(ocrType)) { +// OcrDTO ocr = new OcrDTO(); +// OcrTypeEnum ocrTypeEnum = OcrTypeEnum.findByCode(ocrType); +// if (ocrTypeEnum != OcrTypeEnum.NONE) { +// ocr.setOcrType(ocrTypeEnum); +// ocr.setImgPath(vo.getFilePath()); +//// Result ocrInfo = ocrService.ocr(ocr); +//// if (ocrInfo.isSuccess()) { +//// vo.setOcr(ocrInfo.getData()); +//// } +// } +// } return AjaxResult.success(vo); }