Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qianhe-slsy
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuwenhao
qianhe-slsy
Commits
8a531aa8
Commit
8a531aa8
authored
Feb 05, 2024
by
xuwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.5修改
parent
36c41050
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
19 deletions
+18
-19
qianhe-admin/src/main/java/com/qianhe/system/controller/api/SsWxLogin.java
+1
-1
qianhe-admin/src/main/java/com/qianhe/system/utils/SsWxUserInfoUtils.java
+3
-3
qianhe-admin/src/main/java/com/qianhe/system/utils/WxUserInfoUtils.java
+2
-3
qianhe-admin/src/main/resources/application.yml
+12
-12
No files found.
qianhe-admin/src/main/java/com/qianhe/system/controller/api/SsWxLogin.java
View file @
8a531aa8
...
...
@@ -125,7 +125,7 @@ public class SsWxLogin {
//查询送水工站点信息
WaterStationUserVo
waterStationUser
=
waterStationUserService
.
selectWaterStationUserByPhone
(
waterUser
.
getPhoneNum
());
if
(
StringUtils
.
isNull
(
waterStationUser
)){
throw
new
ServiceException
(
"未查询到您管理
的站点信息,请联系管理员!"
);
return
AjaxResult
.
error
(
"未查询到你
的站点信息,请联系管理员!"
);
}
map
.
put
(
"waterStationUser"
,
waterStationUser
);
return
AjaxResult
.
success
(
map
);
...
...
qianhe-admin/src/main/java/com/qianhe/system/utils/SsWxUserInfoUtils.java
View file @
8a531aa8
...
...
@@ -59,9 +59,9 @@ public class SsWxUserInfoUtils {
//获取phone
String
url
=
"https://api.weixin.qq.com/wxa/business/getuserphonenumber"
+
"?access_token="
+
accessToken
;
Map
<
String
,
String
>
param
=
new
HashMap
<>()
;
param
.
put
(
"code"
,
code
);
JSONObject
wxJson
=
JSONUtil
.
parseObj
(
HttpClientUtil
.
doPost
(
url
,
param
)
);
String
json
=
"{\"code\":\""
+
code
+
"\"}"
;
String
s
=
HttpClientUtil
.
doPostJson
(
url
,
json
);
JSONObject
wxJson
=
JSONUtil
.
parseObj
(
s
);
//返回手机号信息
JSONObject
phone_info
=
JSONUtil
.
parseObj
(
wxJson
.
get
(
"phone_info"
));
//用户绑定的手机号(国外手机号会有区号)
...
...
qianhe-admin/src/main/java/com/qianhe/system/utils/WxUserInfoUtils.java
View file @
8a531aa8
...
...
@@ -67,9 +67,8 @@ public class WxUserInfoUtils {
//获取phone
String
url
=
"https://api.weixin.qq.com/wxa/business/getuserphonenumber"
+
"?access_token="
+
accessToken
;
Map
<
String
,
String
>
param
=
new
HashMap
<>();
param
.
put
(
"code"
,
code
);
JSONObject
wxJson
=
JSONUtil
.
parseObj
(
HttpClientUtil
.
doPost
(
url
,
param
));
String
json
=
"{\"code\":\""
+
code
+
"\"}"
;
JSONObject
wxJson
=
JSONUtil
.
parseObj
(
HttpClientUtil
.
doPostJson
(
url
,
json
));
//返回手机号信息
JSONObject
phone_info
=
JSONUtil
.
parseObj
(
wxJson
.
get
(
"phone_info"
));
//用户绑定的手机号(国外手机号会有区号)
...
...
qianhe-admin/src/main/resources/application.yml
View file @
8a531aa8
...
...
@@ -134,21 +134,21 @@ xss:
# 订水端小程序
wx
:
#测试
appId
:
wxcabea5c944c4327c
appSecret
:
bd486fd54bd1ea5e9b198911d765ce6a
access-token-uri
:
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx.appId}&secret=${wx.appSecret}
#正式
# appId: wx75635671bf9fe9bb
# appSecret: 5ac4f25af14d7cfb3e62870fa1719459
# appId: wxcabea5c944c4327c
# appSecret: bd486fd54bd1ea5e9b198911d765ce6a
# access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx.appId}&secret=${wx.appSecret}
#正式
appId
:
wx75635671bf9fe9bb
appSecret
:
5ac4f25af14d7cfb3e62870fa1719459
access-token-uri
:
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx.appId}&secret=${wx.appSecret}
# 送水端小程序
sswx
:
#测试
appId
:
wxc89600b5b0aee68d
appSecret
:
27ebe3778435c719cc1b97f260b7e026
access-token-uri
:
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${sswx.appId}&secret=${sswx.appSecret}
#正式
# appId: wx3c0181d9800dfbf2
# appSecret: d1382
# appId: wxc89600b5b0aee68d
# appSecret: 27ebe3778435c719cc1b97f260b7e026
# access-token-uri: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${sswx.appId}&secret=${sswx.appSecret}
#正式
appId
:
wx3c0181d9800dfbf2
appSecret
:
d1382ba5e014038ee38eda00d737ac43
access-token-uri
:
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${sswx.appId}&secret=${sswx.appSecret}
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