yujian
2019-12-17 d8e6fe75c7bfb14c73da86b79991bda18d94a105
fanli/src/main/java/com/yeshi/fanli/service/impl/user/QrCodeServiceImpl.java
@@ -134,10 +134,9 @@
   }
   @Override
   public String drawInviteQrCodeNew(String url, Long uid, String portrait, Integer pX, Integer pY, Integer size,
   public String drawInviteQrCodeNew(InputStream urlInputStream, String urlMd5, Long uid, String portrait, Integer pX, Integer pY, Integer size,
         String inviteCode) throws IOException {
      if (StringUtil.isNullOrEmpty(url)) {
      if (urlInputStream == null) {
         return null;
      }
@@ -145,7 +144,7 @@
      String erCodeTempPath = null;
      InputStream erCodeInputStream = null; // 二维码
      InputStream portraitInputStream = null; // 头像
      InputStream urlInputStream = HttpUtil.getAsInputStream(url); // 背景
//      InputStream urlInputStream = HttpUtil.getAsInputStream(url); // 背景
      String uuid = UUID.randomUUID().toString().replace("-", "");
      if (uid == null) {
@@ -169,8 +168,6 @@
         } catch (Exception e) {
            e.printStackTrace();
         }
         urlInputStream = HttpUtil.getAsInputStream(url); // 背景
         portraitInputStream = HttpUtil.getAsInputStream(portrait); // 头像
         erCodeInputStream = new FileInputStream(new File(erCodeTempPath)); // 二维码
      }
@@ -189,9 +186,6 @@
      // 上传文件相对位置
      if (new File(targetPath).exists() && new File(targetPath).length() > 0) {
         int index = url.lastIndexOf("/");
         String newUrl = url.substring(index + 1);
         String urlMd5 = newUrl.substring(0, newUrl.lastIndexOf("."));
         String fileUrl = null;
         if (uid == null) {
            fileUrl = "ercode/" + "ercode_" + uuid + "_" + System.currentTimeMillis() + "_" + urlMd5 + ".jpg";