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
5496fb45
Commit
5496fb45
authored
Jun 23, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.12-对接瓜子接口
parent
161cabd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
TGzController.java
...cloud/plus/v1/yifu/archives/controller/TGzController.java
+5
-4
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TGzController.java
View file @
5496fb45
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.yifu.cloud.plus.v1.yifu.archives.config.GzConfig
;
import
com.yifu.cloud.plus.v1.yifu.archives.config.GzConfig
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService
;
...
@@ -75,16 +76,16 @@ public class TGzController {
...
@@ -75,16 +76,16 @@ public class TGzController {
params
.
put
(
"requestId"
,
requestId
);
params
.
put
(
"requestId"
,
requestId
);
params
.
put
(
"appkey"
,
appkey
);
params
.
put
(
"appkey"
,
appkey
);
params
.
put
(
"nonce"
,
nonce
);
params
.
put
(
"nonce"
,
nonce
);
log
.
error
(
"瓜子推送offer信息,gzOfferInfo="
,
gzOfferInfo
);
log
.
error
(
"瓜子推送offer信息,gzOfferInfo="
+
JSON
.
toJSONString
(
gzOfferInfo
)
);
log
.
error
(
"瓜子推送offer信息,params="
,
params
);
log
.
error
(
"瓜子推送offer信息,params="
+
JSON
.
toJSONString
(
params
)
);
// 2. 计算期望的签名
// 2. 计算期望的签名
String
expectedSignature
=
GZSign
.
getSignature
(
params
,
gzConfig
.
getAppsecret
());
String
expectedSignature
=
GZSign
.
getSignature
(
params
,
gzConfig
.
getAppsecret
());
log
.
error
(
"瓜子推送offer信息,expectedSignature
"
,
expectedSignature
);
log
.
error
(
"瓜子推送offer信息,expectedSignature
="
+
expectedSignature
);
// 3. 比较签名是否一致
// 3. 比较签名是否一致
if
(!
params
.
get
(
"signature"
).
equals
(
expectedSignature
))
{
if
(!
params
.
get
(
"signature"
).
equals
(
expectedSignature
))
{
return
ReturnGz
.
failed
(
"签名验证失败"
);
return
ReturnGz
.
failed
(
"签名验证失败"
);
}
}
log
.
error
(
"签名验证通过
"
,
expectedSignature
);
log
.
error
(
"签名验证通过
,expectedSignature="
+
expectedSignature
);
// 5. 签名验证通过,处理业务逻辑
// 5. 签名验证通过,处理业务逻辑
return
this
.
saveData
(
gzOfferInfo
);
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