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
66704eb6
Commit
66704eb6
authored
Dec 12, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_activity'
parents
e8eba62a
354b8007
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
Activity.java
...c/main/java/com/xxfc/platform/summit/entity/Activity.java
+5
-0
UserBiz.java
...r/src/main/java/com/xxfc/platform/summit/biz/UserBiz.java
+11
-10
No files found.
xx-summit/xx-summit-api/src/main/java/com/xxfc/platform/summit/entity/Activity.java
View file @
66704eb6
...
@@ -110,6 +110,11 @@ public class Activity {
...
@@ -110,6 +110,11 @@ public class Activity {
@ApiModelProperty
(
"0-默认;1-报名中,2-进行中;3-已结束"
)
@ApiModelProperty
(
"0-默认;1-报名中,2-进行中;3-已结束"
)
private
Integer
status
;
private
Integer
status
;
@Column
(
name
=
"live_url"
)
@ApiModelProperty
(
"直播地址"
)
private
String
liveUrl
;
@Column
(
name
=
"content"
)
@Column
(
name
=
"content"
)
@ApiModelProperty
(
"活动图文内容(峰会主题)"
)
@ApiModelProperty
(
"活动图文内容(峰会主题)"
)
private
String
content
;
private
String
content
;
...
...
xx-summit/xx-summit-server/src/main/java/com/xxfc/platform/summit/biz/UserBiz.java
View file @
66704eb6
...
@@ -81,6 +81,7 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
...
@@ -81,6 +81,7 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
userId
=
uses
.
get
(
0
).
getId
();
userId
=
uses
.
get
(
0
).
getId
();
user
.
setId
(
userId
);
user
.
setId
(
userId
);
}
else
{
}
else
{
user
.
setId
(
null
);
Long
time
=
System
.
currentTimeMillis
()/
1000L
;
Long
time
=
System
.
currentTimeMillis
()/
1000L
;
user
.
setWeId
(
weId
);
user
.
setWeId
(
weId
);
user
.
setRId
(
rId
);
user
.
setRId
(
rId
);
...
@@ -97,12 +98,12 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
...
@@ -97,12 +98,12 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
log
.
info
(
"----code为空---"
);
log
.
info
(
"----code为空---"
);
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"code为空"
));
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"code为空"
));
}
}
String
openid
=
"oXDd91MppH9i5F7xzPwigiMj--5w"
;
String
openid
=
null
;
/*
String access_token = null;
String
access_token
=
null
;
try
{
try
{
JSONObject
jsonData
=
weixinService
.
getAccessToken
(
code
);
JSONObject
jsonData
=
weixinService
.
getAccessToken
(
code
);
openid = jsonData.getString("openid");
openid
=
jsonData
.
getString
(
"openid"
);
access_token = jsonData.getString("access_token");
access_token
=
jsonData
.
getString
(
"access_token"
);
String
refresh_token
=
jsonData
.
getString
(
"refresh_token"
);
String
refresh_token
=
jsonData
.
getString
(
"refresh_token"
);
log
.
info
(
"-----微信回调userInfo---openid=="
+
openid
+
"----access_token==="
+
access_token
);
log
.
info
(
"-----微信回调userInfo---openid=="
+
openid
+
"----access_token==="
+
access_token
);
//验证access_token是否失效
//验证access_token是否失效
...
@@ -116,15 +117,15 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
...
@@ -116,15 +117,15 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
info
(
"网络异常==="
+
e
.
getMessage
());
log
.
info
(
"网络异常==="
+
e
.
getMessage
());
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"网络异常"
));
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"网络异常"
));
}
*/
}
try
{
try
{
// 获取微信用户基本信息
// 获取微信用户基本信息
/*
JSONObject userinfo_json = weixinService.getUserInfo(access_token,openid);
JSONObject
userinfo_json
=
weixinService
.
getUserInfo
(
access_token
,
openid
);
if
(
userinfo_json
==
null
||
StringUtils
.
isNotBlank
(
userinfo_json
.
getString
(
"errcode"
)))
{
if
(
userinfo_json
==
null
||
StringUtils
.
isNotBlank
(
userinfo_json
.
getString
(
"errcode"
)))
{
log
.
info
(
"调用微信用户基本信息接口失败"
);
log
.
info
(
"调用微信用户基本信息接口失败"
);
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"调用微信用户基本信息接口失败"
));
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"调用微信用户基本信息接口失败"
));
}
}
log.info("微信用户基本信息---user===" +userinfo_json.toJSONString());
*/
log
.
info
(
"微信用户基本信息---user==="
+
userinfo_json
.
toJSONString
());
if
(
activityId
==
null
||
activityId
==
0
){
if
(
activityId
==
null
||
activityId
==
0
){
ActivityBm
activityBm
=
activityBmBiz
.
userInfo
(
key
);
ActivityBm
activityBm
=
activityBmBiz
.
userInfo
(
key
);
if
(
activityBm
==
null
){
if
(
activityBm
==
null
){
...
@@ -138,9 +139,9 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
...
@@ -138,9 +139,9 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"redis的报名信息activityId---为空"
));
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
,
Sets
.
newSet
(
"redis的报名信息activityId---为空"
));
}
}
User
userInfo
=
new
User
();
User
userInfo
=
new
User
();
String
nickName
=
"苹果呀"
;
//
userinfo_json.getString("nickname");
String
nickName
=
userinfo_json
.
getString
(
"nickname"
);
String
headimgurl
=
"http://thirdwx.qlogo.cn/mmopen/4eFHvhmOX6XuiaG6ib7wxkLa8AwMLFIbW9BSJ7EmwC3kRMUdgCrobdRUbhjMXbkY7aBc2CazjXFJiap5ianMH6yQnH2UQ4TfkXJw/132"
;
//
userinfo_json.getString("headimgurl");
String
headimgurl
=
userinfo_json
.
getString
(
"headimgurl"
);
String
sex
=
"2"
;
//
userinfo_json.getString("sex");
String
sex
=
userinfo_json
.
getString
(
"sex"
);
if
(
StringUtils
.
isBlank
(
sex
)){
if
(
StringUtils
.
isBlank
(
sex
)){
sex
=
"0"
;
sex
=
"0"
;
}
}
...
...
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