Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangming
/
kzy-wx
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 469a7c92
authored
Mar 12, 2020
by
刘志强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
1 parent
8a5a591a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
src/main/java/com/server/web/controller/WeixinIndexController.java
src/main/java/com/server/web/controller/WeixinIndexController.java
View file @
469a7c9
...
...
@@ -33,6 +33,12 @@ import static com.jfinal.weixin.sdk.kit.PaymentKit.xmlToMap;
@RestController
@RequestMapping
(
value
=
BaseController
.
WX_NAMESPACE
+
"/wxIndex"
,
produces
=
"application/json"
)
public
class
WeixinIndexController
extends
BaseController
{
@Value
(
"${wx.app.secret}"
)
private
String
appSecret
;
@Value
(
"${wx.app.id}"
)
private
String
appId
;
@Value
(
"${wx.tocken}"
)
private
String
wxTocken
;
@Autowired
private
TKzyUserMapper
userMapper
;
@RequestMapping
(
value
=
"/authorizeCallback"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
...
...
@@ -86,10 +92,7 @@ public class WeixinIndexController extends BaseController{
}
@Value
(
"${wx.app.secret}"
)
private
String
appSecret
;
@Value
(
"${wx.app.id}"
)
private
String
appId
;
public
Map
<
String
,
Object
>
getAccessToken
()
{
String
accessToken
=
getAccessToken
(
appId
,
appSecret
);
if
(
StringUtils
.
hasText
(
accessToken
))
{
...
...
@@ -194,8 +197,7 @@ public class WeixinIndexController extends BaseController{
return
returnError
(
"0"
,
"获取签名失败"
,
""
);
}
@Value
(
"${wx.tocken}"
)
private
String
wxTocken
;
public
boolean
checkSignature
(
String
signature
,
String
timestamp
,
String
nonce
)
{
String
[]
str
=
new
String
[]{
wxTocken
,
timestamp
,
nonce
};
//排序
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment