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(); + } + } } } }