记得上下班打卡 | 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
42a42506
Commit
42a42506
authored
Nov 22, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add type
parent
88af985a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
SweetWechatApplyEventPushController.java
...sweet/controller/SweetWechatApplyEventPushController.java
+23
-14
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetWechatApplyEventPushController.java
View file @
42a42506
...
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.sweet.controller;
import
com.liquidnet.service.sweet.service.impl.SweetWechatApplyEventPushServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -16,12 +17,16 @@ public class SweetWechatApplyEventPushController {
@Autowired
private
SweetWechatApplyEventPushServiceImpl
pushService
;
@GetMapping
(
produces
=
"text/plain;charset=utf-8"
)
public
String
authGet
(
@PathVariable
Integer
type
,
@RequestParam
(
name
=
"signature"
,
required
=
false
)
String
signature
,
@RequestParam
(
name
=
"timestamp"
,
required
=
false
)
String
timestamp
,
@RequestParam
(
name
=
"nonce"
,
required
=
false
)
String
nonce
,
@RequestParam
(
name
=
"echostr"
,
required
=
false
)
String
echostr
)
{
// @GetMapping(produces = "text/plain;charset=utf-8")
@GetMapping
(
"{type}"
)
@ApiOperation
(
"验签调用"
)
public
String
authGet
(
@PathVariable
Integer
type
,
@RequestParam
(
name
=
"signature"
,
required
=
false
)
String
signature
,
@RequestParam
(
name
=
"timestamp"
,
required
=
false
)
String
timestamp
,
@RequestParam
(
name
=
"nonce"
,
required
=
false
)
String
nonce
,
@RequestParam
(
name
=
"echostr"
,
required
=
false
)
String
echostr
)
{
log
.
info
(
"\n接收到来自微信服务器的认证消息:signature = [{}], timestamp = [{}], nonce = [{}], echostr = [{}]"
,
signature
,
timestamp
,
nonce
,
echostr
);
...
...
@@ -32,14 +37,18 @@ public class SweetWechatApplyEventPushController {
return
pushService
.
authGet
(
type
,
timestamp
,
nonce
,
signature
,
echostr
);
}
@PostMapping
(
produces
=
"application/xml; charset=UTF-8"
)
public
String
post
(
@PathVariable
Integer
type
,
@RequestBody
String
requestBody
,
@RequestParam
(
name
=
"msg_signature"
,
required
=
false
)
String
msgSignature
,
@RequestParam
(
name
=
"encrypt_type"
,
required
=
false
)
String
encryptType
,
@RequestParam
(
name
=
"signature"
,
required
=
false
)
String
signature
,
@RequestParam
(
"timestamp"
)
String
timestamp
,
@RequestParam
(
"nonce"
)
String
nonce
)
{
// @PostMapping(produces = "application/xml; charset=UTF-8")
@PostMapping
(
"{type}"
)
@ApiOperation
(
"用户动作回调"
)
public
String
post
(
@PathVariable
Integer
type
,
@RequestBody
String
requestBody
,
@RequestParam
(
name
=
"msg_signature"
,
required
=
false
)
String
msgSignature
,
@RequestParam
(
name
=
"encrypt_type"
,
required
=
false
)
String
encryptType
,
@RequestParam
(
name
=
"signature"
,
required
=
false
)
String
signature
,
@RequestParam
(
"timestamp"
)
String
timestamp
,
@RequestParam
(
"nonce"
)
String
nonce
)
{
log
.
info
(
"\n接收微信请求:[msg_signature=[{}], encrypt_type=[{}], signature=[{}],"
+
" timestamp=[{}], nonce=[{}], requestBody=[\n{}\n] "
,
msgSignature
,
encryptType
,
signature
,
timestamp
,
nonce
,
requestBody
);
...
...
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