Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
6e4aa349
You need to sign in or sign up before continuing.
Commit
6e4aa349
authored
Jun 23, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.12-对接瓜子接口
parent
14afa273
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
TGzController.java
...cloud/plus/v1/yifu/archives/controller/TGzController.java
+5
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TGzController.java
View file @
6e4aa349
...
...
@@ -68,19 +68,23 @@ public class TGzController {
public
ReturnGz
<
String
>
saveOfferInfo
(
@RequestBody
TGzOfferInfo
gzOfferInfo
,
@RequestParam
String
expires
,
@RequestParam
String
signature
,
@RequestParam
String
requestId
,
@RequestParam
String
appkey
,
@RequestParam
String
nonce
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"expires"
,
expires
);
params
.
put
(
"signature"
,
signature
);
params
.
put
(
"requestId"
,
requestId
);
params
.
put
(
"appkey"
,
appkey
);
params
.
put
(
"nonce"
,
nonce
);
log
.
error
(
"瓜子推送offer信息,gzOfferInfo="
,
gzOfferInfo
);
log
.
error
(
"瓜子推送offer信息,params="
,
params
);
// 2. 计算期望的签名
String
expectedSignature
=
GZSign
.
getSignature
(
params
,
gzConfig
.
getAppsecret
());
log
.
error
(
"瓜子推送offer信息,expectedSignature"
,
expectedSignature
);
// 3. 比较签名是否一致
if
(!
params
.
get
(
"signature"
).
equals
(
expectedSignature
))
{
return
ReturnGz
.
failed
(
"签名验证失败"
);
}
log
.
error
(
"签名验证通过"
,
expectedSignature
);
// 5. 签名验证通过,处理业务逻辑
return
this
.
saveData
(
gzOfferInfo
);
}
...
...
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