Commit a01e5f67 authored by 赵啸非's avatar 赵啸非

修改操作日志过滤

parent 2a89db71
...@@ -11518,7 +11518,7 @@ dict|object|字典对象 ...@@ -11518,7 +11518,7 @@ dict|object|字典对象
参数名称|类型|必填|描述 参数名称|类型|必填|描述
:---|:---|:---|:------ :---|:---|:---|:------
body|String|是|请求参数体
**请求样例:** **请求样例:**
``` ```
......
...@@ -70,12 +70,14 @@ public class MidSignApiController { ...@@ -70,12 +70,14 @@ public class MidSignApiController {
@PostMapping(value = "sign") @PostMapping(value = "sign")
@UnAuth @UnAuth
public Rest<SignResp> midSign() { public Rest<SignResp> midSign(@RequestBody String body) {
SignResp signResp = new SignResp(); SignResp signResp = new SignResp();
try { try {
Map<String, String> headerMap = new HashMap<>(); Map<String, String> headerMap = new HashMap<>();
headerMap.put("appId", appId); headerMap.put("appId", appId);
headerMap.put("appKey", appKey); headerMap.put("appKey", appKey);
headerMap.put("body", body);
String timeStamp = System.currentTimeMillis() + ""; String timeStamp = System.currentTimeMillis() + "";
headerMap.put("timeStamp", timeStamp); headerMap.put("timeStamp", timeStamp);
String nonce = RandomUtil.randomNumbers(12); String nonce = RandomUtil.randomNumbers(12);
...@@ -93,7 +95,9 @@ public class MidSignApiController { ...@@ -93,7 +95,9 @@ public class MidSignApiController {
signSb.append(params.getKey()).append("=").append(params.getValue() + "").append("&"); signSb.append(params.getKey()).append("=").append(params.getValue() + "").append("&");
} }
String signStr = signSb.substring(0, signSb.length() - 1); String signStr = signSb.substring(0, signSb.length() - 1);
log.info("签名源字符串: " + signStr);
String sign = EncryptionUtils.SHA256(signStr); String sign = EncryptionUtils.SHA256(signStr);
log.info("签名计算结果: " + sign);
signResp.setSign(sign); signResp.setSign(sign);
return Rest.ok(signResp); return Rest.ok(signResp);
} catch (Exception e) { } catch (Exception e) {
......
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