From e0992a4e73ef5166acd3e58a828b2133baaefae6 Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Sat, 19 Jun 2021 11:51:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8C=85=E5=90=8D=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PicturesTemplateBuildingServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplatebuilding/impl/PicturesTemplateBuildingServiceImpl.java b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplatebuilding/impl/PicturesTemplateBuildingServiceImpl.java index aab496e..f357350 100644 --- a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplatebuilding/impl/PicturesTemplateBuildingServiceImpl.java +++ b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplatebuilding/impl/PicturesTemplateBuildingServiceImpl.java @@ -9,12 +9,14 @@ import cn.com.tenlion.buildingpictures.util.BaiDuMapUtil; import cn.com.tenlion.buildingpictures.util.BarCodeUtils; import cn.com.tenlion.buildingpictures.util.CreateImageBean; import cn.com.tenlion.buildingpictures.util.WeiXinBarCodeUtils; +import com.github.pagehelper.util.StringUtil; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.module.file.service.IFileService; import ink.wgink.pojo.pos.FilePO; import ink.wgink.properties.FileProperties; import ink.wgink.util.QRCodeUtil; import org.apache.commons.codec.binary.Base64; +import org.apache.commons.codec.binary.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Service; @@ -309,7 +311,11 @@ public class PicturesTemplateBuildingServiceImpl extends DefaultBaseService impl key.setAccessible(true); if (index.equals(key.getName())) { if (key.getType() == String.class) { - content = key.get(bean).toString(); + if(key.get(bean) != null) { + if(!StringUtil.isEmpty(key.get(bean).toString())) { + content = key.get(bean).toString(); + } + } } } }