From 985927bd2625ac212f9794a0ca8a984fb7d2edaa Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Thu, 2 Sep 2021 15:10:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E4=BB=98/=E7=BC=B4?= =?UTF-8?q?=E8=B4=B9/=E6=8F=90=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PicturesTemplateServiceImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplate/impl/PicturesTemplateServiceImpl.java b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplate/impl/PicturesTemplateServiceImpl.java index 8bbb5ac..5f52ae9 100644 --- a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplate/impl/PicturesTemplateServiceImpl.java +++ b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplate/impl/PicturesTemplateServiceImpl.java @@ -518,7 +518,19 @@ public class PicturesTemplateServiceImpl extends DefaultBaseService implements I @Override public SuccessResultData buiderPicturesTemplate(String picturesTemplateCode) throws Exception { - String base64 = iPicturesTemplateBuildingService.buildingPictures(picturesTemplateCode, null); + PicturesTemplateDTO templateDTO = getPicturesTemplateByCode(picturesTemplateCode); + List areaList = iPicturesTemplateAreaService.getPicturesTemplateAreaByPicturesTemplateId(templateDTO.getPicturesTemplateId()); + Map params = new HashMap(); + for(PicturesTemplateAreaDTO areaDto : areaList) { + String content = "2".equals(areaDto.getTemplateAreaServerLink()) ? areaDto.getTemplateAreaFile() : areaDto.getTemplateAreaFontValue(); + /** + * 1位占位区域 , 2为需要填充的区域 (占位区域可以后台定义, 因此也可能是传入的值) + */ + if("2".equals(areaDto.getTemplateAreaType())){ + params.put(areaDto.getTemplateAreaSource(), content); + } + } + String base64 = iPicturesTemplateBuildingService.buildingPictures(picturesTemplateCode, params); SuccessResultData result = new SuccessResultData(""); if(base64 != null ) { result.setData(base64);