fix wxNickname &appleEmail

main
wangqing 8 months ago
parent 8fb3940434
commit 26cc96e9c8

@ -163,6 +163,7 @@ public class LoginController extends BaseController {
UserInfo loginUserInfo = new UserInfo(); UserInfo loginUserInfo = new UserInfo();
// loginUserInfo.setMobile(appleLoginReq.getMobile()); // loginUserInfo.setMobile(appleLoginReq.getMobile());
loginUserInfo.setAppleId(appleLoginReq.getUserIdentifier()); loginUserInfo.setAppleId(appleLoginReq.getUserIdentifier());
loginUserInfo.setAppleEmail(playloadObj.get("email")+"");
loginUserInfo.setLastLoginIp(getIpAddr(request)); loginUserInfo.setLastLoginIp(getIpAddr(request));
loginUserInfo.setLastUseDeviceId(appleLoginReq.getDeviceId()); loginUserInfo.setLastUseDeviceId(appleLoginReq.getDeviceId());
loginUserInfo.setLastUseDeviceBrand(appleLoginReq.getDeviceBrand()); loginUserInfo.setLastUseDeviceBrand(appleLoginReq.getDeviceBrand());

@ -119,6 +119,8 @@ public class MyController extends BaseController {
userRespDTO.setMobile(user.getMobile()); userRespDTO.setMobile(user.getMobile());
userRespDTO.setWxId(user.getWxId()); userRespDTO.setWxId(user.getWxId());
userRespDTO.setAppleId(user.getAppleId()); userRespDTO.setAppleId(user.getAppleId());
userRespDTO.setWxNickname(user.getWxNickname());
userRespDTO.setAppleEmail(user.getAppleEmail());
return Result.success(userRespDTO); return Result.success(userRespDTO);
} }
@ -499,6 +501,7 @@ public class MyController extends BaseController {
// 如果绑定的手机号已存在 // 如果绑定的手机号已存在
// userInfo1.setMobile(loginReq.getMobile()); // userInfo1.setMobile(loginReq.getMobile());
userInfo1.setAppleId(userInfo2.getAppleId()); userInfo1.setAppleId(userInfo2.getAppleId());
userInfo1.setAppleEmail(userInfo2.getAppleEmail());
userInfoService.update(userInfo1); userInfoService.update(userInfo1);
String token = userInfoService.loginOrRegister(userInfo1); String token = userInfoService.loginOrRegister(userInfo1);
userInfoService.deleteById(userId); userInfoService.deleteById(userId);

@ -54,4 +54,9 @@ public class UserRespDTO implements Serializable {
@ApiModelProperty(value = "微信 wx id") @ApiModelProperty(value = "微信 wx id")
private String wxId; private String wxId;
@ApiModelProperty(value = "微信 nickName")
private String wxNickname;
@ApiModelProperty(value = "apple绑定的邮箱")
private String appleEmail;
} }

@ -54,6 +54,11 @@ public class UserInfo implements Serializable {
*/ */
private String wxNickname; private String wxNickname;
/**
* apple
*/
private String appleEmail;
/** /**
* *
*/ */

Loading…
Cancel
Save