Prechádzať zdrojové kódy

Merge branch 'master' of http://47.108.172.52:3000/dayou/item-management-1phase

GouGengquan 1 rok pred
rodič
commit
7023beb1a6

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

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