From 7ebf1115cd93a7cd84c25780029c7d55190b727c Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Sat, 14 Aug 2021 19:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=A8=E6=80=81=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E8=87=AA=E5=8A=A8=E6=8E=92=E7=89=88=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E7=9A=84=E4=BF=9D=E5=AD=98=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PicturesTemplateServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 92ab095..f1f7ec3 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 @@ -523,10 +523,14 @@ public class PicturesTemplateServiceImpl extends DefaultBaseService implements I if(base64 != null ) { result.setData(base64); /** - * 更新预览图 + * 更新预览图 , 将旧的预览图删除掉 */ - String picturesTemplatePictureUrl = iPicturesTemplateBuildingService.saveBase64ToFile(base64); PicturesTemplateDTO dto = picturesTemplateDao.getPicturesTemplateByCode(picturesTemplateCode); + // 因为使用快照的原因, 旧的预览图片不能删除 2021年8月14日19:32:57 + /*if(!StringUtils.isEmpty(dto.getPicturesTemplatePictureUrl())) { + iFileService.delete(dto.getPicturesTemplatePictureUrl()); + }*/ + String picturesTemplatePictureUrl = iPicturesTemplateBuildingService.saveBase64ToFile(base64); Map map = new HashMap(); map.put("picturesTemplatePicture", base64); map.put("picturesTemplatePictureUrl", picturesTemplatePictureUrl);