去除BaseDocumentService,方法都放到DocumentService

This commit is contained in:
2025-07-01 16:16:21 +08:00
parent 2be1b4acf9
commit 5e0c59f2f5
7 changed files with 86 additions and 146 deletions

View File

@@ -135,10 +135,6 @@ public class DocumentServiceImpl implements DocumentService {
}
}
public byte[] wordToPdf(byte[] source, String sourceFormat, boolean clear) {
return wordToPdf(source, clear);
}
public byte[] wordToPdf(byte[] source, boolean clear) {
try {
long start = System.currentTimeMillis();
@@ -185,10 +181,6 @@ public class DocumentServiceImpl implements DocumentService {
return null;
}
public byte[] wordToImage(byte[] source, String sourceExtension, String targetExtension) {
return wordToImage(source, targetExtension);
}
public byte[] docToDocx(byte[] source) {
return convert(source, "doc", "docx", "wdFormatDocumentDefault");
}

View File

@@ -91,7 +91,7 @@ public class DocumentServiceImpl implements DocumentService {
* @param targetExtension 目标文件后缀名
* @return 转换后的文件流
*/
public byte[] convert(byte[] source, String sourceExtension, String targetExtension) {
private byte[] convert(byte[] source, String sourceExtension, String targetExtension) {
try {
sourceExtension = sourceExtension.replace(".", "");
targetExtension = targetExtension.replace(".", "");
@@ -131,10 +131,6 @@ public class DocumentServiceImpl implements DocumentService {
}
}
public byte[] wordToPdf(byte[] source, String sourceFormat, boolean clear) {
return wordToPdf(source, clear);
}
public byte[] wordToPdf(byte[] source, boolean clear) {
try {
long start = System.currentTimeMillis();
@@ -181,10 +177,6 @@ public class DocumentServiceImpl implements DocumentService {
return null;
}
public byte[] wordToImage(byte[] source, String sourceExtension, String targetExtension) {
return wordToImage(source, targetExtension);
}
public byte[] docToDocx(byte[] source) {
return convert(source, "doc", "docx");
}