Commit 566fcee9 authored by 廖旭伟's avatar 廖旭伟

sign接口参数顺序修改

parent 76c59047
......@@ -8,6 +8,7 @@ import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.busiz.req.MidReq;
......@@ -38,16 +39,14 @@ import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -80,7 +79,9 @@ public class MidSignApiController {
if("post".equalsIgnoreCase(midReq.getMethod())){
headerMap.put("appId", appId);
headerMap.put("appKey", appKey);
headerMap.put("body", midReq.getBody());
JSONObject object1 = JSONObject.parseObject(midReq.getBody());
headerMap.put("body", object1.toJSONString());
String timeStamp = System.currentTimeMillis() + "";
headerMap.put("timeStamp", timeStamp);
String nonce = RandomUtil.randomNumbers(6);
......@@ -126,4 +127,5 @@ public class MidSignApiController {
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment