diff --git a/docus-api-common/src/main/java/com/docus/server/common/service/impl/FileUploadServiceImpl.java b/docus-api-common/src/main/java/com/docus/server/common/service/impl/FileUploadServiceImpl.java index 2d4145c..b5f9bf0 100644 --- a/docus-api-common/src/main/java/com/docus/server/common/service/impl/FileUploadServiceImpl.java +++ b/docus-api-common/src/main/java/com/docus/server/common/service/impl/FileUploadServiceImpl.java @@ -130,16 +130,17 @@ public class FileUploadServiceImpl implements IFileUploadService { public void compressFile(String compressPath,String picPath ,Double compressWidth) { if (Func.isNotBlank(compressPath)) { try { - File compressFile= new File(compressPath); + File compressFile= new File(compressPath); if (!compressFile.getParentFile().exists()) { compressFile.getParentFile().mkdirs(); } - File compressDest = new File(saveCompressFilePath); + File compressDest = new File(compressPath); BufferedImage image = ImageIO.read(new File(picPath)); int width = image.getWidth(); //图片压缩 ImgUtil.scale(image, FileUtil.file(compressDest), (float) (compressWidth / width)); }catch (Exception e){ + log.error(e.getMessage(), e); }finally { } } @@ -163,6 +164,7 @@ public class FileUploadServiceImpl implements IFileUploadService { //剪切 ImgUtil.cut(image, FileUtil.file(cutDest), new Rectangle(0, startY, width, endY)); }catch (Exception e){ + log.error(e.getMessage(), e); }finally { } }