he2802 пре 1 година
родитељ
комит
bc6373e580

BIN
zhongzheng-common/src/main/resources/static/694515817698614/004.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/001.png


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/002.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/0020.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/0024.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/003.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/0030.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/00312.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/0033.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/004.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/005.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/0051.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/006.jpg


BIN
zhongzheng-common/src/main/resources/static/867735392558919680/2323.jpg


+ 16 - 5
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateTpServiceImpl.java

@@ -18,6 +18,7 @@ import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
+import com.zhongzheng.common.utils.ToolsUtils;
 import com.zhongzheng.modules.alioss.service.OssService;
 import com.zhongzheng.modules.base.bo.CertificateTpAddBo;
 import com.zhongzheng.modules.base.bo.CertificateTpEditBo;
@@ -780,13 +781,23 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
         return chapterListTxt;
     }
 
+
+    private String getImgDir(){
+        String tenantId = ToolsUtils.getTenantId();
+        if(tenantId.equals("694515817698614")){
+            return tenantId;
+        }else {
+            return "867735392558919680";
+        }
+    }
+
     private String drawPic(CertificatePhotoVo entity){
         Font font = new Font("微软雅黑", Font.PLAIN, 45);// 添加字体的属性设置
         String projectUrl = "D:\\test\\";
         String imgName = projectUrl + "out01.jpg";
         try {
             // 加载本地图片
-            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/002.jpg");
+            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/"+getImgDir()+"/002.jpg");
     //        String imageLocalUrl = projectUrl + "002.jpg";
    //         BufferedImage imageLocal = ImageIO.read(new File(imageLocalUrl));
             BufferedImage imageLocal = ImageIO.read(imgStream);
@@ -856,7 +867,7 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
         String imgName = null;
         try {
             // 加载本地图片
-            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/003.jpg");
+            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/"+getImgDir()+"/003.jpg");
             //        String imageLocalUrl = projectUrl + "003.jpg";
             //         BufferedImage imageLocal = ImageIO.read(new File(imageLocalUrl));
             BufferedImage imageLocal = ImageIO.read(imgStream);
@@ -917,7 +928,7 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
         String imgName = null;
         try {
             // 加载图片
-            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/004.jpg");
+            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/"+getImgDir()+"/004.jpg");
             //        String imageLocalUrl = projectUrl + "003.jpg";
             //         BufferedImage imageLocal = ImageIO.read(new File(imageLocalUrl));
             BufferedImage imageLocal = ImageIO.read(imgStream);
@@ -1000,7 +1011,7 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
         String imgName = null;
         try {
             // 加载本地图片
-            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/005.jpg");
+            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/"+getImgDir()+"/005.jpg");
             //        String imageLocalUrl = projectUrl + "003.jpg";
             //         BufferedImage imageLocal = ImageIO.read(new File(imageLocalUrl));
             BufferedImage imageLocal = ImageIO.read(imgStream);
@@ -1095,7 +1106,7 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
         String imgName = null;
         try {
             // 加载本地图片
-            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/006.jpg");
+            InputStream imgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("static/"+getImgDir()+"/006.jpg");
             //        String imageLocalUrl = projectUrl + "003.jpg";
             //         BufferedImage imageLocal = ImageIO.read(new File(imageLocalUrl));
             BufferedImage imageLocal = ImageIO.read(imgStream);