Merge branch 'master_240112发版'

# Conflicts:
#	src/main/java/com/chinaunicom/mall/ebtp/extend/wps/service/impl/WpsServiceImpl.java
This commit is contained in:
zhangqinbin
2024-01-12 17:40:17 +08:00
4 changed files with 25 additions and 2 deletions

View File

@ -46,4 +46,9 @@ public class KingSoftWpsPreviewVo {
*/
private String fileLastModifiedTime;
/**
* 水印
*/
private WatermarkConfig watermarkConfig;
}

View File

@ -0,0 +1,9 @@
package com.chinaunicom.mall.ebtp.extend.wps.entity;
import lombok.Data;
@Data
public class WatermarkConfig {
private String type = "0";
private String value = "empty";
}

View File

@ -614,7 +614,14 @@ public class WpsServiceImpl implements WpsService {
dataJson = JSON.toJSONString(vo);
}
String retJson = HttpUtils.httpPost(url, dataJson);//httpPost(kswpsurl,json);
//String retJson = HttpUtils.httpPost(url, dataJson);//httpPost(kswpsurl,json);
String retJson = "";
if(url.indexOf("https://")>=0){
retJson = HttpsUtils.UrlPost(url, "utf-8", dataJson);
}else{
retJson = HttpUtils.httpPost(url, dataJson);
}
log.info("ret:"+retJson);
//String retJson = HttpUtils.httpPost(kswpsurl,json);
@ -942,6 +949,7 @@ public class WpsServiceImpl implements WpsService {
//String jm = RSA.encrypt("1538803364727304192_20231219095538_0_doc_客户端测试子项目1-XY926020101-服务费通知书-杭州安恒信息技术股份有限公司",wpsService.kswpublicKey);
String jm = RSA.encrypt("1538803364727304192_20231219095538_0_doc",wpsService.kswpublicKey);
//System.out.println(jm);
// String jm = "FmwOetVUoBs0M9rjHUpWhkSu3HWI+fujD5fh+Gwv/XQo3h5JpMghBMHdLpcgVtRYSxfvOROWyi4sUiooEm8yNU5GYmxR7LE/wvecp4fFMXeEtOgHnX4dNzITBorcqWjqS286a7LGCKAmC33CO7gP/lQewPPHiu9qzueWESLGsxM=";

View File

@ -19,7 +19,7 @@ import java.util.Map;
@Slf4j
public class HttpsUtils {
public static String UrlPost(String url,String charSet, String json){
return UrlPost(url,charSet,json,null);
}
@ -104,6 +104,7 @@ public class HttpsUtils {
return str;
}
private static class TrustAnyTrustManager implements X509TrustManager {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {