记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
ec1a381f
Commit
ec1a381f
authored
Oct 15, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add log
parent
6e05b19b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
PerformancesExpressCallbackServiceImpl.java
...ress/shunfeng/PerformancesExpressCallbackServiceImpl.java
+3
-0
SweetWechatActionCallbackController.java
...sweet/controller/SweetWechatActionCallbackController.java
+11
-6
No files found.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/express/shunfeng/PerformancesExpressCallbackServiceImpl.java
View file @
ec1a381f
...
...
@@ -64,6 +64,7 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
private
DataUtils
dataUtils
;
public
boolean
orderStatus
(
@RequestBody
String
params
)
{
log
.
info
(
"接收ExpressOrderStatus请求:[params={}]"
,
params
);
boolean
res
=
shunfengSignUtils
.
receiveRequestAndCheckSign
(
params
,
httpServletRequest
);
if
(
res
)
{
PerformanceExpressPushStatusParam
performanceExpressPushStatusParam
=
JsonUtils
.
fromJson
(
params
,
PerformanceExpressPushStatusParam
.
class
);
...
...
@@ -90,6 +91,7 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
}
public
boolean
orderFreightList
(
@RequestBody
String
params
)
{
log
.
info
(
"接收ExpressOrderFreightList请求:[params={}]"
,
params
);
boolean
res
=
shunfengSignUtils
.
receiveRequestAndCheckSign
(
params
,
httpServletRequest
);
if
(
res
)
{
PerformanceExpressPushFreightParam
performanceExpressPushFreightParam
=
JsonUtils
.
fromJson
(
params
,
PerformanceExpressPushFreightParam
.
class
);
...
...
@@ -117,6 +119,7 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
}
public
boolean
orderRoute
(
@RequestBody
String
params
)
{
log
.
info
(
"接收ExpressOrderRoute请求:[params={}]"
,
params
);
boolean
res
=
shunfengSignUtils
.
receiveRequestAndCheckSign
(
params
,
httpServletRequest
);
// {"id":"123","mailno":"SF1020099313222","orderid":"NEW127745085969203221966686005","acceptTime":"2021-06-20 11:37:33","acceptAddress":"深圳市","remark":"顺丰已收件(测试推送)","opCode":"80","companyId":"557104628450889728","routeAddress":"https://devplatform.zhengzai.tv/platform/performancesExpress/orderRoute"}
if
(
res
)
{
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetWechatActionCallbackController.java
View file @
ec1a381f
...
...
@@ -59,13 +59,18 @@ public class SweetWechatActionCallbackController {
@RequestParam
(
name
=
"encrypt_type"
,
required
=
false
)
String
encType
,
@RequestParam
(
name
=
"msg_signature"
,
required
=
false
)
String
msgSignature
)
{
log
.
info
(
"\n接收微信请求:[type=[{}], openid=[{}], [signature=[{}], encType=[{}], msgSignature=[{}],"
+
" timestamp=[{}], nonce=[{}], requestBody=[\n{}\n] "
,
type
,
openid
,
signature
,
encType
,
msgSignature
,
timestamp
,
nonce
,
requestBody
);
if
(!
wechatSignUtils
.
checkSignature
(
signature
,
timestamp
,
nonce
))
{
log
.
info
(
"验签未通过,非法请求,可能属于伪造的请求!"
);
try
{
log
.
info
(
"\n接收微信请求:[type=[{}], openid=[{}], [signature=[{}], encType=[{}], msgSignature=[{}],"
+
" timestamp=[{}], nonce=[{}], requestBody=[\n{}\n] "
,
type
,
openid
,
signature
,
encType
,
msgSignature
,
timestamp
,
nonce
,
requestBody
);
if
(!
wechatSignUtils
.
checkSignature
(
signature
,
timestamp
,
nonce
))
{
log
.
info
(
"验签未通过,非法请求,可能属于伪造的请求!"
);
return
""
;
}
return
sweetWechatCallbackService
.
record
(
requestBody
,
type
,
timestamp
,
nonce
,
encType
,
msgSignature
);
}
catch
(
Exception
e
)
{
log
.
error
(
"用户动作微信回调Exception:[msg=[{}], e=[{}]]"
,
e
.
getMessage
(),
e
);
return
""
;
}
return
sweetWechatCallbackService
.
record
(
requestBody
,
type
,
timestamp
,
nonce
,
encType
,
msgSignature
);
}
}
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