Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
9dddf6d9
Commit
9dddf6d9
authored
Sep 30, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
e52017f1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
WeixinService.java
...n/java/com/xxfc/platform/universal/biz/WeixinService.java
+1
-0
UserInfoController.java
...xfc/platform/universal/controller/UserInfoController.java
+4
-1
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/WeixinService.java
View file @
9dddf6d9
...
@@ -76,6 +76,7 @@ public class WeixinService {
...
@@ -76,6 +76,7 @@ public class WeixinService {
try
{
try
{
HttpSession
session
=
request
.
getSession
();
HttpSession
session
=
request
.
getSession
();
String
frontSessionValue1
=
(
String
)
session
.
getAttribute
(
frontSessionKey
);
String
frontSessionValue1
=
(
String
)
session
.
getAttribute
(
frontSessionKey
);
log
.
info
(
"---session获取===="
+
frontSessionValue1
);
if
(
StringUtils
.
isBlank
(
frontSessionValue1
))
{
if
(
StringUtils
.
isBlank
(
frontSessionValue1
))
{
return
null
;
return
null
;
}
}
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/UserInfoController.java
View file @
9dddf6d9
...
@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
...
@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.UserAgentUtil
;
import
com.github.wxiaoqi.security.common.util.UserAgentUtil
;
import
com.xxfc.platform.universal.biz.WeixinService
;
import
com.xxfc.platform.universal.biz.WeixinService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -20,6 +21,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -20,6 +21,7 @@ import javax.servlet.http.HttpServletRequest;
@RestController
@RestController
@RequestMapping
(
"info"
)
@RequestMapping
(
"info"
)
@IgnoreUserToken
@IgnoreUserToken
@Slf4j
public
class
UserInfoController
{
public
class
UserInfoController
{
...
@@ -31,11 +33,12 @@ public class UserInfoController {
...
@@ -31,11 +33,12 @@ public class UserInfoController {
@RequestMapping
(
value
=
"getOpenId"
,
method
=
RequestMethod
.
GET
)
//匹配的是href中的download请求
@RequestMapping
(
value
=
"getOpenId"
,
method
=
RequestMethod
.
GET
)
//匹配的是href中的download请求
public
ObjectRestResponse
sendSms
(
HttpServletRequest
request
)
throws
Exception
{
public
ObjectRestResponse
getOpenId
(
HttpServletRequest
request
)
throws
Exception
{
boolean
isWx
=
UserAgentUtil
.
isWexinBrowser
(
request
);
boolean
isWx
=
UserAgentUtil
.
isWexinBrowser
(
request
);
if
(
isWx
)
{
if
(
isWx
)
{
//session里面获取用户信息
//session里面获取用户信息
String
openId
=
weixinService
.
getSession
(
request
);
String
openId
=
weixinService
.
getSession
(
request
);
log
.
info
(
"---进入方法getOpenId----openId===="
+
openId
);
if
(
StringUtils
.
isBlank
(
openId
)){
if
(
StringUtils
.
isBlank
(
openId
)){
JSONObject
json
=
new
JSONObject
();
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"sendUrl"
,
sendUrl
);
json
.
put
(
"sendUrl"
,
sendUrl
);
...
...
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