|
|
|
@ -51,6 +51,8 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple |
|
|
|
|
public UserEntity saveWeChatUser(String code,HttpServletResponse response) { |
|
|
|
|
|
|
|
|
|
String accessTokenUrl = String.format(weChatConfig.getOPEN_ACCESS_TOKEN_URL(),weChatConfig.getOpenAppid(),weChatConfig.getOpenAppsecret(),code); |
|
|
|
|
System.out.println("code===="+code); |
|
|
|
|
System.out.println("accessTokenUrl===="+accessTokenUrl); |
|
|
|
|
|
|
|
|
|
//获取access_token
|
|
|
|
|
Map<String ,Object> baseMap = HttpUtils.doGet(accessTokenUrl); |
|
|
|
@ -92,8 +94,8 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple |
|
|
|
|
if(dbUser == null){//openId不存在,返回绑定手机号页面,须另写绑定手机号接口
|
|
|
|
|
log.info("dbUser为空,openId不存在,请先绑定手机号哦~~~"); |
|
|
|
|
try { |
|
|
|
|
// response.sendRedirect("https://www.feifanhitech.com/index/#/bind-phone?matched="+md5UnionId);
|
|
|
|
|
response.sendRedirect("https://www.huorantech.cn/index/#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面
|
|
|
|
|
response.sendRedirect("https://www.feifanhitech.com/index/#/bind-phone?matched="+md5UnionId); |
|
|
|
|
// response.sendRedirect("https://www.huorantech.cn/index/#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面
|
|
|
|
|
//response.sendRedirect("http://8.129.127.185/dq/index.html#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面
|
|
|
|
|
} catch (IOException e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
@ -159,9 +161,9 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple |
|
|
|
|
if (countWeChatId > 0){ |
|
|
|
|
try { |
|
|
|
|
log.info("微信重复了,我走到了这里............................."); |
|
|
|
|
response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token+"&message=1"); |
|
|
|
|
// response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token+"&message=1");
|
|
|
|
|
//response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token+"&message=1");
|
|
|
|
|
// response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token+"&message=1");
|
|
|
|
|
response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token+"&message=1"); |
|
|
|
|
} catch (IOException e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
@ -171,9 +173,9 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple |
|
|
|
|
if (result){ |
|
|
|
|
try { |
|
|
|
|
log.info("转发成功---------------------------------------"); |
|
|
|
|
response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token); |
|
|
|
|
// response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token);
|
|
|
|
|
//response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token);
|
|
|
|
|
// response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token);
|
|
|
|
|
response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token); |
|
|
|
|
}catch (IOException e){ |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|