From b2b9f15f799bf34ad46a522d79bb89e4c9889257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E5=A4=B4=E4=BA=BA?= <3076767823@qq.com> Date: Mon, 17 Mar 2025 10:27:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=B8=B2=E6=9F=93=E5=99=A8=E5=9B=BE=E7=89=87=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/dpkj/common/utils/TemplateUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/dpkj/common/utils/TemplateUtils.java b/src/main/java/com/dpkj/common/utils/TemplateUtils.java index 02196ad..8b40f11 100644 --- a/src/main/java/com/dpkj/common/utils/TemplateUtils.java +++ b/src/main/java/com/dpkj/common/utils/TemplateUtils.java @@ -145,8 +145,8 @@ public class TemplateUtils { String[] split = key.split("_"); if (split.length > 1 && split[1].equals("2base64Type")) { int type = split.length > 2 ? Integer.parseInt(split[2]) : 1; - int width = split.length > 2 ? Integer.parseInt(split[3]) : 100; - int height = split.length > 3 ? Integer.parseInt(split[4]) : 100; + int width = split.length > 3 ? Integer.parseInt(split[3]) : 100; + int height = split.length > 4 ? Integer.parseInt(split[4]) : 100; // 如果是图片类型,需要进行base64转换 String base64 = this.generateQRCode(type, String.valueOf(data.get(key)), width, height); context.setVariable(split[0], "data:image/jpeg;base64," + base64);