diff --git a/luoo_user/src/main/java/com/luoo/user/controller/LoginController.java b/luoo_user/src/main/java/com/luoo/user/controller/LoginController.java index 1f8e557..c0a97ef 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/LoginController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/LoginController.java @@ -163,6 +163,7 @@ public class LoginController extends BaseController { UserInfo loginUserInfo = new UserInfo(); // loginUserInfo.setMobile(appleLoginReq.getMobile()); loginUserInfo.setAppleId(appleLoginReq.getUserIdentifier()); + loginUserInfo.setAppleEmail(playloadObj.get("email")+""); loginUserInfo.setLastLoginIp(getIpAddr(request)); loginUserInfo.setLastUseDeviceId(appleLoginReq.getDeviceId()); loginUserInfo.setLastUseDeviceBrand(appleLoginReq.getDeviceBrand()); diff --git a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java index e28de9d..d38b643 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java @@ -119,6 +119,8 @@ public class MyController extends BaseController { userRespDTO.setMobile(user.getMobile()); userRespDTO.setWxId(user.getWxId()); userRespDTO.setAppleId(user.getAppleId()); + userRespDTO.setWxNickname(user.getWxNickname()); + userRespDTO.setAppleEmail(user.getAppleEmail()); return Result.success(userRespDTO); } @@ -499,6 +501,7 @@ public class MyController extends BaseController { // 如果绑定的手机号已存在 // userInfo1.setMobile(loginReq.getMobile()); userInfo1.setAppleId(userInfo2.getAppleId()); + userInfo1.setAppleEmail(userInfo2.getAppleEmail()); userInfoService.update(userInfo1); String token = userInfoService.loginOrRegister(userInfo1); userInfoService.deleteById(userId); diff --git a/luoo_user/src/main/java/com/luoo/user/dto/response/UserRespDTO.java b/luoo_user/src/main/java/com/luoo/user/dto/response/UserRespDTO.java index cca1ed4..f042f37 100644 --- a/luoo_user/src/main/java/com/luoo/user/dto/response/UserRespDTO.java +++ b/luoo_user/src/main/java/com/luoo/user/dto/response/UserRespDTO.java @@ -54,4 +54,9 @@ public class UserRespDTO implements Serializable { @ApiModelProperty(value = "微信 wx id") private String wxId; + @ApiModelProperty(value = "微信 nickName") + private String wxNickname; + + @ApiModelProperty(value = "apple绑定的邮箱") + private String appleEmail; } diff --git a/luoo_user/src/main/java/com/luoo/user/pojo/UserInfo.java b/luoo_user/src/main/java/com/luoo/user/pojo/UserInfo.java index a8bc2be..0b81bc0 100644 --- a/luoo_user/src/main/java/com/luoo/user/pojo/UserInfo.java +++ b/luoo_user/src/main/java/com/luoo/user/pojo/UserInfo.java @@ -54,6 +54,11 @@ public class UserInfo implements Serializable { */ private String wxNickname; + /** + * apple绑定的邮箱 + */ + private String appleEmail; + /** * 头像 */