瀏覽代碼

修复盖章报错

wucl 11 月之前
父節點
當前提交
26b8085ac7
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      service/src/main/java/com/dayou/service/impl/BusinessProductionServiceImpl.java

+ 2 - 1
service/src/main/java/com/dayou/service/impl/BusinessProductionServiceImpl.java

@@ -101,7 +101,8 @@ public class BusinessProductionServiceImpl implements IBusinessProductionService
         try {
             if (StrUtil.isNotBlank(filePath)){
                 //filePath 为相对路径,这里需要加上/opt
-                InputStream inputStream = new FileInputStream("/opt"+filePath);
+                filePath = "/opt" + filePath;
+                InputStream inputStream = new FileInputStream(filePath);
                 Resource resource = resourceLoader.getResource("classpath:static/image/stamp.png");
                 PersonalUtils.addPublicStamp(inputStream,resource,filePath);
                 inputStream.close();