优化裁决书签名功能
This commit is contained in:
@@ -193,51 +193,7 @@ public class BestsignOpenApiClient {
|
|||||||
return responseObj.toJSONString();
|
return responseObj.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传文件
|
|
||||||
*
|
|
||||||
* @param arbitrSignatuVO
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public String uploadContact(ArbitrSignatuVO arbitrSignatuVO) throws Exception {
|
|
||||||
String methodInvoke = "/storage/contract/upload/";
|
|
||||||
JSONObject requestParam = new JSONObject();
|
|
||||||
|
|
||||||
requestParam.put("account", arbitrSignatuVO.getAccount());
|
|
||||||
requestParam.put("fmd5", arbitrSignatuVO.getFileMd5());
|
|
||||||
requestParam.put("fdata", arbitrSignatuVO.getFileData());
|
|
||||||
requestParam.put("fpages", arbitrSignatuVO.getFilePages());
|
|
||||||
requestParam.put("fname", arbitrSignatuVO.getFileName());
|
|
||||||
requestParam.put("ftype", arbitrSignatuVO.getFileType());
|
|
||||||
requestParam.put("title", arbitrSignatuVO.getContractTitle());
|
|
||||||
requestParam.put("expireTime", arbitrSignatuVO.getPeriodValidity());
|
|
||||||
|
|
||||||
|
|
||||||
String timestamsParam = RSAUtils.getRtick();
|
|
||||||
// 计算参数签名
|
|
||||||
String paramsSign = RSAUtils.calcRsaSign(this.developerId,
|
|
||||||
this.privateKey, this.serverHost, methodInvoke, timestamsParam, null,
|
|
||||||
requestParam.toJSONString());
|
|
||||||
// 签名参数追加为url参数
|
|
||||||
String fullUrlParams = String.format(urlSignParams, this.developerId,
|
|
||||||
timestamsParam, paramsSign);
|
|
||||||
String responseResult = HttpClientSender.sendHttpPost(this.serverHost, methodInvoke,
|
|
||||||
fullUrlParams, requestParam.toJSONString());
|
|
||||||
JSONObject responseObj = JSON.parseObject(responseResult);
|
|
||||||
// 返回errno为0,表示成功,其他表示失败
|
|
||||||
if (responseObj.getIntValue("errno") == 0) {
|
|
||||||
JSONObject data = responseObj.getJSONObject("data");
|
|
||||||
if (data != null) {
|
|
||||||
String contractId = data.getString("contractId");
|
|
||||||
return contractId;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
log.error("上传文件异常:" + responseObj.toJSONString());
|
|
||||||
}
|
|
||||||
return responseObj.toJSONString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取签署链接
|
* 获取签署链接
|
||||||
|
|||||||
Reference in New Issue
Block a user