|
|
@@ -65,7 +65,10 @@ public class AuthenticationController {
|
|
|
@ApiOperation(value = "手机号验证码登录")
|
|
|
public String phoneLogin(String phone, String code, @RequestParam(required = false) Long invitor) {
|
|
|
User user = userService.loginByPhone(phone, code);
|
|
|
- userService.bindAuctionInvitor(user.getId(), invitor);
|
|
|
+ InviteType userInviteType = user.getInviteType();
|
|
|
+ if (invitor != null & userInviteType != InviteType.AUCTION) {
|
|
|
+ userService.bindAuctionInvitor(user.getId(), invitor);
|
|
|
+ }
|
|
|
return jwtTokenUtil.generateToken(JwtUserFactory.create(user));
|
|
|
}
|
|
|
|
|
|
@@ -81,7 +84,10 @@ public class AuthenticationController {
|
|
|
@ApiOperation(value = "手机号密码登录")
|
|
|
public String phonePwdLogin(String phone, String password, @RequestParam(required = false) Long invitor) {
|
|
|
User user = userService.loginByPhonePwd(phone, password);
|
|
|
- userService.bindAuctionInvitor(user.getId(), invitor);
|
|
|
+ InviteType userInviteType = user.getInviteType();
|
|
|
+ if (invitor != null & userInviteType != InviteType.AUCTION) {
|
|
|
+ userService.bindAuctionInvitor(user.getId(), invitor);
|
|
|
+ }
|
|
|
return jwtTokenUtil.generateToken(JwtUserFactory.create(user));
|
|
|
}
|
|
|
|