add:删除多余注释,添加定时任务日志打印

This commit is contained in:
wxyclub
2023-07-05 17:17:49 +08:00
parent cc6331f6a6
commit 8c677a7715
3 changed files with 6 additions and 13 deletions
@@ -61,12 +61,6 @@ public class OnlyofficePdfUtil {
HttpEntity entityRes = response.getEntity();
if (entityRes != null) {
InputStream content = entityRes.getContent();
// byte[] getData = readInputStream(content);
// File file = new File(filePath);
// FileOutputStream fos = new FileOutputStream(file);
// fos.write(getData);
// fos.close();
// File file = new File(Objects.requireNonNull(this.getClass().getClassLoader().getResource("")).getPath()+ filePdfName);
File file = new File(filePath);
FileUtils.copyInputStreamToFile(content,file);
content.close();
@@ -103,8 +97,6 @@ public class OnlyofficePdfUtil {
}
public static String convertFile(String onlyOfficeUrl,String titleName,String key, String onlineFilePath) throws Exception{
//String url = "http://47.92.92.38:8103/7.2.1-34/ConvertService.ashx";
// String url = "http://10.100.5.116:8088/7.2.1-34/ConvertService.ashx";
Map<String,Object> map = new HashMap<>();
map.put("async",false);
map.put("filetype","docx");
@@ -114,7 +106,6 @@ public class OnlyofficePdfUtil {
// map.put("url","https://10.100.5.111:3306/file/"+onlineFilePath);
map.put("url","https://srms.foton.com.cn/file/"+onlineFilePath);
logger.info("=======================================https://srms.foton.com.cn/file/"+onlineFilePath);
//map.put("url","https://srms.foton.com.cn/file/model/task_768330d8/task_768330d8_top_768330d8_node.docx");
JSONObject requestJson = new JSONObject(map);
logger.info("=========================post参数:{}",requestJson);
// 创建HttpClientBuilder
@@ -130,7 +121,6 @@ public class OnlyofficePdfUtil {
.setConnectTimeout(60000)
.build();
httpPost.setConfig(requestConfig);
// httpPost.addHeader("Content-Type","application/json");
CloseableHttpResponse response = null;
try {
//设置post请求方式为JSON