|
|
@ -110,13 +110,13 @@ public class WeChatAouth2Service {
|
|
|
|
redisTemplate.opsForValue().set(loginReq.getCode(),accessToken.getOpenid(),10,TimeUnit.MINUTES);
|
|
|
|
redisTemplate.opsForValue().set(loginReq.getCode(),accessToken.getOpenid(),10,TimeUnit.MINUTES);
|
|
|
|
return Result.failed(StatusCode.WECHAT_MOBILE_UNBINDED);
|
|
|
|
return Result.failed(StatusCode.WECHAT_MOBILE_UNBINDED);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
UserInfo loginUserInfo = new UserInfo();
|
|
|
|
// UserInfo loginUserInfo = new UserInfo();
|
|
|
|
// loginUserInfo.setWxId(accessToken.getOpenid());
|
|
|
|
// loginUserInfo.setWxId(accessToken.getOpenid());
|
|
|
|
// loginUserInfo.setMobile(loginReq.getMobile());
|
|
|
|
// loginUserInfo.setMobile(loginReq.getMobile());
|
|
|
|
loginUserInfo.setLastUseDeviceId(loginReq.getDeviceId());
|
|
|
|
userInfo.setLastUseDeviceId(loginReq.getDeviceId());
|
|
|
|
loginUserInfo.setLastUseDeviceBrand(loginReq.getDeviceBrand());
|
|
|
|
userInfo.setLastUseDeviceBrand(loginReq.getDeviceBrand());
|
|
|
|
loginUserInfo.setLastLoginIp(ipAddress);
|
|
|
|
userInfo.setLastLoginIp(ipAddress);
|
|
|
|
String token = userInfoService.wechatlogin(loginUserInfo);
|
|
|
|
String token = userInfoService.wechatlogin(userInfo);
|
|
|
|
return Result.success(token);
|
|
|
|
return Result.success(token);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|