Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
a306f99b
Commit
a306f99b
authored
Mar 03, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改操作日志过滤
parent
a01e5f67
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
23 deletions
+28
-23
base-manager/doc/api.md
base-manager/doc/api.md
+2
-1
base-manager/src/main/java/com/mortals/xhx/busiz/req/MidReq.java
...nager/src/main/java/com/mortals/xhx/busiz/req/MidReq.java
+2
-8
base-manager/src/main/java/com/mortals/xhx/busiz/web/MidSignApiController.java
.../java/com/mortals/xhx/busiz/web/MidSignApiController.java
+24
-14
No files found.
base-manager/doc/api.md
View file @
a306f99b
...
...
@@ -11518,11 +11518,12 @@ dict|object|字典对象
参数名称|类型|必填|描述
:---|:---|:---|:------
method|String|是|请求方法(post或者get)
body|String|是|请求参数体
**请求样例:**
```
{}
{
"method":"post","body":{"test":"嘻嘻嘻"}
}
```
**响应参数:**
...
...
base-manager/src/main/java/com/mortals/xhx/busiz/req/MidReq.java
View file @
a306f99b
...
...
@@ -10,14 +10,8 @@ import lombok.Data;
@Data
public
class
MidReq
{
private
String
appI
d
;
private
String
metho
d
;
private
String
appKey
;
private
String
timeStamp
;
private
String
nonce
;
private
String
secretKey
;
private
String
body
;
}
base-manager/src/main/java/com/mortals/xhx/busiz/web/MidSignApiController.java
View file @
a306f99b
...
...
@@ -70,25 +70,35 @@ public class MidSignApiController {
@PostMapping
(
value
=
"sign"
)
@UnAuth
public
Rest
<
SignResp
>
midSign
(
@RequestBody
String
body
)
{
public
Rest
<
SignResp
>
midSign
(
@RequestBody
MidReq
midReq
)
{
SignResp
signResp
=
new
SignResp
();
try
{
Map
<
String
,
String
>
headerMap
=
new
HashMap
<>();
headerMap
.
put
(
"appId"
,
appId
);
headerMap
.
put
(
"appKey"
,
appKey
);
headerMap
.
put
(
"body"
,
body
);
String
timeStamp
=
System
.
currentTimeMillis
()
+
""
;
headerMap
.
put
(
"timeStamp"
,
timeStamp
);
String
nonce
=
RandomUtil
.
randomNumbers
(
12
);
headerMap
.
put
(
"nonce"
,
nonce
);
headerMap
.
put
(
"appSecret"
,
secretKey
);
if
(
"post"
.
equalsIgnoreCase
(
midReq
.
getMethod
())){
headerMap
.
put
(
"appId"
,
appId
);
headerMap
.
put
(
"appKey"
,
appKey
);
headerMap
.
put
(
"body"
,
midReq
.
getBody
());
String
timeStamp
=
System
.
currentTimeMillis
()
+
""
;
headerMap
.
put
(
"timeStamp"
,
timeStamp
);
String
nonce
=
RandomUtil
.
randomNumbers
(
12
);
headerMap
.
put
(
"nonce"
,
nonce
);
headerMap
.
put
(
"appSecret"
,
secretKey
);
signResp
.
setAppId
(
appId
);
signResp
.
setAppKey
(
appKey
);
signResp
.
setTimeStamp
(
timeStamp
);
signResp
.
setNonce
(
nonce
);
signResp
.
setSecretKey
(
secretKey
);
signResp
.
setAppId
(
appId
);
signResp
.
setAppKey
(
appKey
);
signResp
.
setTimeStamp
(
timeStamp
);
signResp
.
setNonce
(
nonce
);
signResp
.
setSecretKey
(
secretKey
);
}
else
if
(
"get"
.
equalsIgnoreCase
(
midReq
.
getMethod
())){
HashMap
<
String
,
String
>
paramsMap
=
JSON
.
parseObject
(
midReq
.
getBody
(),
HashMap
.
class
);
if
(!
paramsMap
.
isEmpty
())
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
paramsMap
.
entrySet
())
{
headerMap
.
put
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
}
StringBuilder
signSb
=
new
StringBuilder
();
for
(
Map
.
Entry
<
String
,
String
>
params
:
headerMap
.
entrySet
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment