|
@@ -778,22 +778,25 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
|
|
|
* @return
|
|
|
*/
|
|
|
public String getPdfFileUrl(ArchiveFile file) {
|
|
|
- //
|
|
|
- String url = file.getPdfFileUrl();
|
|
|
- if (StringUtil.isEmpty(url)) {
|
|
|
- String fileUrl = file.getFileUrl();
|
|
|
-
|
|
|
- if (StringUtils.isNotEmpty(fileUrl) && fileUrl.endsWith(".pdf") ) {
|
|
|
- url = file.getFileUrl();
|
|
|
+ String url = null;
|
|
|
+ try {
|
|
|
+ if (file != null) {
|
|
|
+ url = file.getPdfFileUrl();
|
|
|
+ if (StringUtil.isEmpty(url)) {
|
|
|
+ String fileUrl = file.getFileUrl();
|
|
|
+ if (fileUrl != null && StringUtils.isNotEmpty(fileUrl) && fileUrl.endsWith(".pdf")) {
|
|
|
+ url = fileUrl;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
-
|
|
|
//todo 生成相册内容,待补充
|
|
|
-
|
|
|
-
|
|
|
return url;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 刷新文件大小
|
|
|
*
|