fix some codestyle problem

This commit is contained in:
陈精华
2023-05-06 16:51:06 +08:00
parent 9e3d450854
commit 93fb40d282
19 changed files with 97 additions and 96 deletions

View File

@ -56,7 +56,8 @@ public class CadFilePreviewImpl implements FilePreview {
if (!convertResult) {
return otherFilePreview.notSupportedFile(model, fileAttribute, "cad文件转换异常请联系管理员");
}
if( ConfigConstants.getdeletesourcefile()){ //是否保留CAD源文件
//是否保留CAD源文件
if( ConfigConstants.getDeleteSourceFile()) {
KkFileUtils.deleteFileByPath(filePath);
}
if (ConfigConstants.isCacheEnabled()) {

View File

@ -61,7 +61,8 @@ public class CompressFilePreviewImpl implements FilePreview {
}
}
if (!ObjectUtils.isEmpty(fileTree)) {
if( ConfigConstants.getdeletesourcefile()){ //是否保留压缩包源文件
//是否保留压缩包源文件
if (ConfigConstants.getDeleteSourceFile()) {
KkFileUtils.deleteFileByPath(filePath);
}
if (ConfigConstants.isCacheEnabled()) {

View File

@ -114,7 +114,8 @@ public class OfficeFilePreviewImpl implements FilePreview {
// 对转换后的文件进行操作(改变编码方式)
fileHandlerService.doActionConvertedFile(outFilePath);
}
if(ConfigConstants.getdeletesourcefile()){ //是否保留OFFICE源文件
//是否保留OFFICE源文件
if (ConfigConstants.getDeleteSourceFile()) {
KkFileUtils.deleteFileByPath(filePath);
}
if (isUseCached) {

View File

@ -60,8 +60,9 @@ public class TiffFilePreviewImpl implements FilePreview {
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
}
String filePath = response.getContent();
if(ConvertPicUtil.convertJpg2Pdf(filePath, outFilePath)){
if(ConfigConstants.getdeletesourcefile()){ //是否保留TIFF源文件
if (ConvertPicUtil.convertJpg2Pdf(filePath, outFilePath)) {
//是否保留TIFF源文件
if (ConfigConstants.getDeleteSourceFile()) {
KkFileUtils.deleteFileByPath(filePath);
}
if (ConfigConstants.isCacheEnabled()) {
@ -70,11 +71,10 @@ public class TiffFilePreviewImpl implements FilePreview {
}
model.addAttribute("pdfUrl", pdfName);
return PDF_FILE_PREVIEW_PAGE;
}else {
} else {
return NOT_SUPPORTED_FILE_PAGE;
}
}
else {
} else {
model.addAttribute("pdfUrl", pdfName);
return PDF_FILE_PREVIEW_PAGE;
}