From 1261c227e7ad47607ee651bbd017ea80eb6d044a Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 14 十二月 2019 18:45:31 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/QrCodeServiceImpl.java | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/QrCodeServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/QrCodeServiceImpl.java index 8fa984d..d3de45c 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/QrCodeServiceImpl.java +++ b/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"; -- Gitblit v1.8.0