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