|
|
|
@ -55,6 +55,7 @@ public class HighUserCommonController { |
|
|
|
|
@ApiOperation(value = "登录接口【用户不存在会自动注册】") |
|
|
|
|
public ResponseData login(@RequestParam(value = "phone", required = true) String phone, |
|
|
|
|
@RequestParam(value = "code", required = true) String code, |
|
|
|
|
@RequestParam(value = "openId", required = false) String openId, |
|
|
|
|
@RequestParam(value = "popularizeUserId", required = false) Long popularizeUserId, |
|
|
|
|
@RequestParam(value = "regionId", required = false) String regionId, |
|
|
|
|
HttpServletRequest request, HttpServletResponse response) { |
|
|
|
@ -70,12 +71,16 @@ public class HighUserCommonController { |
|
|
|
|
redisUtil.del("SMS_"+phone); |
|
|
|
|
|
|
|
|
|
HighUser user = highUserService.findByPhone(phone); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(user == null) { |
|
|
|
|
user = new HighUser(); |
|
|
|
|
user.setName("用户" + IDGenerator.nextId(5)); |
|
|
|
|
user.setPhone(phone); |
|
|
|
|
user.setRegTime(new Date()); |
|
|
|
|
user.setGold(0); |
|
|
|
|
user.setOpenIdH5(openId); |
|
|
|
|
user.setStatus(1); |
|
|
|
|
// 用户信息完整状态
|
|
|
|
|
// 0:完整
|
|
|
|
@ -84,6 +89,9 @@ public class HighUserCommonController { |
|
|
|
|
user.setInfoCompleteStatus(1); |
|
|
|
|
|
|
|
|
|
highUserService.insertUser(user , popularizeUserId , regionId); |
|
|
|
|
} else { |
|
|
|
|
user.setOpenIdH5(openId); |
|
|
|
|
highUserService.updateUser(user); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HighUserModel highUserModel = new HighUserModel(); |
|
|
|
|