Compare commits

...

6 Commits

Author SHA1 Message Date
chenxudong bad2cbc494 恢复到以前 2025-08-13 09:36:13 +08:00
chenxudong 78e2df602a 调通了。 2025-08-12 18:27:43 +08:00
chenxudong 5bf8e615e0 优化代码。 2025-08-12 16:53:24 +08:00
chenxudong 6cfe0691d2 优化代码。 2025-08-12 09:59:55 +08:00
chenxudong dffa55ddef Merge branch 'release3.0.4' into develop 2025-08-11 14:44:17 +08:00
chenxudong 490287e815 Merge branch 'release3.0.4' into develop 2025-08-06 16:54:52 +08:00
6 changed files with 7 additions and 12 deletions

View File

@ -695,7 +695,7 @@ public class CommonService {
fileName,
destPath,
strategyStr,
finalEdFileInfo.getFileName() + "." + suffix);
Optional.ofNullable(finalEdFileInfo).map(EdFileInfo::getFileName).orElse("") + "." + suffix);
return ElectromagneticResultUtil.success(Optional.ofNullable(finalEdFileInfo).map(EdFileInfo::getId).orElse(""));
}

View File

@ -299,7 +299,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
String fileSysPath = commonService.getFileSysPath(id);
String dbPath = commonService.getDbPath(fileInfo.getFilePath());
try {
Assert.isTrue(FileUtil.exist(fileSysPath), "下载文件不存在,路径为 {}", dbPath);
Assert.isTrue(FileUtil.exist(fileSysPath), "下载文件不存在");
FileSystemResource fileSystemResource = new FileSystemResource(fileSysPath);
fileName = fileSystemResource.getFilename();
HttpHeaders headers = new HttpHeaders();
@ -1351,7 +1351,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
} catch (Exception e) {
String info = StrFormatter.format("文件预览错误文件id是--->{},错误信息--->{}", id, e.getMessage());
log.error(info, e);
throw new BizException(info);
throw new BizException("文件预览错误文件id是 " + id);
} finally {
FileUtil.del(fileSaveTmpPath);
}

View File

@ -94,7 +94,7 @@ public class FileTagRelationServiceImpl extends ServiceImpl<FileTagRelationMappe
EdFileInfo fileInfo = edFileInfoMapper.selectById(fileId);
String dbPath = commonService.getDbPath(fileInfo.getFilePath());
UserThreadLocal.setSuccessInfo(Optional.ofNullable(fileInfo).map(EdFileInfo::getParentId).orElse(""), fileId, "添加了标签 {} 到文件 {}", tags, dbPath);
UserThreadLocal.setSuccessInfo(Optional.of(fileInfo).map(EdFileInfo::getParentId).orElse(""), fileId, "添加了标签 {} 到文件 {}", tags, dbPath);
}
return isSuccess;
}

View File

@ -155,11 +155,7 @@ public class PermissionServiceImpl implements PermissionService {
allCodes = FilePermission.getAllCodesExcludeView();
}
for (String code : allCodes) {
if (permissionCodes.contains(code)) {
result.put(code, true);
} else {
result.put(code, false);
}
result.put(code, permissionCodes.contains(code));
}
return result;
}

View File

@ -245,7 +245,7 @@ public class BackupTask {
}
DateTime dateTime = DateUtil.offsetDay(DateUtil.date(), -1);
List<File> files = FileUtil.loopFiles(sqlScript, file -> file.lastModified() < dateTime.getTime());
List<File> files = FileUtil.loopFiles(elePropertyConfig.getSqlDirs(), file -> file.lastModified() < dateTime.getTime());
files.forEach(file -> {
boolean deleteSuccess = file.delete();
String success = deleteSuccess ? "success" : "fail";
@ -253,7 +253,6 @@ public class BackupTask {
log.info(msg);
});
} catch (Exception e) {
log.warn("导出MySQL数据异常原因 {}", e.getMessage(), e);
}

View File

@ -98,7 +98,7 @@ public final class EleCommonUtil {
aes.decrypt(inputStream, outputStream, true);
}
} catch (Exception e) {
String info = "文件加密失败";
String info = "文件加/解密失败";
log.error(info, e);
throw new BizException(info);
} finally {