admin
2020-05-19 744594ef1a2f530fc3e86ea9dc48b62247f79420
fanli/src/main/java/com/yeshi/fanli/service/impl/user/QrCodeServiceImpl.java
@@ -60,6 +60,12 @@
         InputStream portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像
         InputStream erCodeInputStream = new FileInputStream(new File(erCodeTempPath)); // 二维码
         // 官方默认头像
         if (portraitInputStream == null) {
            portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png");
         }
         // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片
         ImageUtil.inviteFriendImg(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, inviteCode);
@@ -109,6 +115,11 @@
         InputStream portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像
         InputStream erCodeInputStream = new FileInputStream(new File(erCodeTempPath)); // 二维码
         // 官方默认头像
         if (portraitInputStream == null) {
            portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png");
         }
         // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片
         ImageUtil.inviteFriendImg(urlInputStream, portraitInputStream, erCodeInputStream, targetPath,
               erCodePostionX, erCodePostionY, erCodeSize, inviteCode);
@@ -161,7 +172,6 @@
         portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png");
      } else {
         targetPath = FileUtil.getCacheDir() + "/share_" + uid + "_" + System.currentTimeMillis() + ".jpg";
         erCodeTempPath = FileUtil.getCacheDir() + "/" + uid + "_" + System.currentTimeMillis() + ".jpg";
@@ -175,7 +185,13 @@
         portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像
         erCodeInputStream = new FileInputStream(new File(erCodeTempPath)); // 二维码
      }
      // 官方默认头像
      if (portraitInputStream == null) {
         portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png");
      }
      // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片
      ImageUtil.inviteFriendImgWhitecustom(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, pX, pY,
            size, inviteCode);
@@ -247,6 +263,11 @@
         portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像
      }
      // 官方默认头像
      if (portraitInputStream == null) {
         portraitInputStream = ImageUtil.class.getClassLoader().getResourceAsStream("image/official_icon.png");
      }
      // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片
      ImageUtil.drawInviteToGreet(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, inviteCode,
            content, date);