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);