|
|
@ -158,9 +158,9 @@ public class WechatController { |
|
|
|
highUserService.updateUser(user); |
|
|
|
highUserService.updateUser(user); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} 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 = new HighUser(); |
|
|
|
user.setName("用户" + IDGenerator.nextId(5)); |
|
|
|
user.setName("用户" + IDGenerator.nextId(5)); |
|
|
|
user.setPhone(phoneNoInfo.getPurePhoneNumber()); |
|
|
|
user.setPhone(phoneNoInfo.getPurePhoneNumber()); |
|
|
@ -175,6 +175,14 @@ public class WechatController { |
|
|
|
// 2:需要填写手机号
|
|
|
|
// 2:需要填写手机号
|
|
|
|
user.setInfoCompleteStatus(1); |
|
|
|
user.setInfoCompleteStatus(1); |
|
|
|
highUserService.insertUser(user); |
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 定义个人所有数据
|
|
|
|
// 定义个人所有数据
|
|
|
|