Selaa lähdekoodia

bugfix----导入大屏已存在的图片时不会实时替换问题

Raod 3 vuotta sitten
vanhempi
sitoutus
0638e23c5f

+ 5 - 1
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java

@@ -316,11 +316,15 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi
                     LambdaQueryWrapper<GaeaFile> queryWrapper = Wrappers.lambdaQuery();
                     queryWrapper.eq(GaeaFile::getFileId, fileName);
                     GaeaFile gaeaFile = gaeaFileService.selectOne(queryWrapper);
+                    String uploadPath;
                     if (null == gaeaFile) {
                         GaeaFile upload = gaeaFileService.upload(imageFile, fileName);
                         log.info("存入图片: {}", upload.getFilePath());
-                        fileMap.put(fileName, upload.getUrlPath());
+                        uploadPath = upload.getUrlPath();
+                    }else {
+                        uploadPath = gaeaFile.getUrlPath();
                     }
+                    fileMap.put(fileName, uploadPath);
                 }
             }