From c8f11c229b87d1652b6da0b15576c166cd51eb8b Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 01 一月 2020 14:25:22 +0800 Subject: [PATCH] 首页悬浮图mapperbug修改,增加商品详情中的比例展示 --- 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