Commit 66704eb6 authored by hezhen's avatar hezhen

Merge branch 'master_activity'

parents e8eba62a 354b8007
...@@ -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;
......
...@@ -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";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment