|
@@ -42,13 +42,11 @@ public class SYUtils {
|
|
|
* @return
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
- public String getSignature() throws IOException {
|
|
|
+ public String getSignature(String xReqNonce,String timestamp) throws IOException {
|
|
|
logger.error("====获取签名===进入到了com.kingdee.eas.custom.jiuzhoutong.utils.SYUtils.getSignature=======");
|
|
|
TreeMap<String, String> treeMap = new TreeMap<>();
|
|
|
String version = propt.getProperty("version");//版本
|
|
|
- Long timestamp = new Date().getTime();//时间差
|
|
|
String appKey = propt.getProperty("appKey");//身份标识
|
|
|
- String xReqNonce = UUID.randomUUID().toString().replace("-", "");//调用者生成的 UUID(32位),结合时间戳timestamp 防重放
|
|
|
String appSecret = propt.getProperty("appSecret");//秘钥
|
|
|
logger.error("=============参数列================");
|
|
|
logger.error("version:"+version);
|
|
@@ -102,7 +100,7 @@ public class SYUtils {
|
|
|
String timestamp = String.valueOf(new Date().getTime());
|
|
|
String version = propt.getProperty("version");
|
|
|
String xReqNonce = UUID.randomUUID().toString().replace("-", "");//调用者生成的 UUID(32位),结合时间戳timestamp 防重放
|
|
|
- String signature = this.getSignature();
|
|
|
+ String signature = this.getSignature(xReqNonce,timestamp);
|
|
|
Map<String,String> parameters = new HashMap<String,String>();
|
|
|
parameters.put("appKey",appKey);
|
|
|
parameters.put("timestamp",timestamp);
|