|
|
|
@ -158,9 +158,9 @@ public class WechatController { |
|
|
|
|
highUserService.updateUser(user); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (highUserService.findByPhone(phoneNoInfo.getPurePhoneNumber()) != null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.MiniProgram, ErrorCode.COMMON_ERROR, "手机号已被绑定,请更换后重新授权"); |
|
|
|
|
} |
|
|
|
|
// 根据手机号查询用户
|
|
|
|
|
user = highUserService.findByPhone(phoneNoInfo.getPurePhoneNumber()); |
|
|
|
|
if (user == null) { |
|
|
|
|
user = new HighUser(); |
|
|
|
|
user.setName("用户" + IDGenerator.nextId(5)); |
|
|
|
|
user.setPhone(phoneNoInfo.getPurePhoneNumber()); |
|
|
|
@ -175,6 +175,14 @@ public class WechatController { |
|
|
|
|
// 2:需要填写手机号
|
|
|
|
|
user.setInfoCompleteStatus(1); |
|
|
|
|
highUserService.insertUser(user); |
|
|
|
|
} else { |
|
|
|
|
if (StringUtils.isBlank(user.getName())) { |
|
|
|
|
user.setName("用户" + IDGenerator.nextId(5)); |
|
|
|
|
} |
|
|
|
|
user.setOpenId(session.getOpenid()); |
|
|
|
|
user.setUnionId(session.getUnionid()); |
|
|
|
|
highUserService.updateUser(user); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 定义个人所有数据
|
|
|
|
|