提交代码

dev-discount
胡锐 3 years ago
parent 2fcdf91dd3
commit 437d6b9285
  1. 14
      hai-cweb/src/main/java/com/cweb/controller/WechatController.java

@ -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);
}
}
// 定义个人所有数据

Loading…
Cancel
Save