| | |
| | | inviteCode = inviteCode.toUpperCase();
|
| | | // 邀请码对应用户信息
|
| | | UserInfo inviter = userInfoService.getUserInfoByInviteCode(inviteCode);
|
| | | if (inviter == null)
|
| | | if (inviter == null || inviter.getState() != UserInfo.STATE_NORMAL)
|
| | | throw new UserInfoExtraException(1, "上级邀请码不存在");
|
| | |
|
| | | // 绑定关系
|
| | |
| | | if (inviterId == null)
|
| | | throw new UserInfoExtraException(1, "没有对应的邀请关系");
|
| | |
|
| | | UserInfo boss = userInfoService.selectByPKey(inviterId);
|
| | | if (boss == null || boss.getState() != UserInfo.STATE_NORMAL) {
|
| | | throw new UserInfoExtraException(1, "没有对应的邀请关系");
|
| | | }
|
| | |
|
| | | // 绑定关系
|
| | | try {
|
| | | threeSaleSerivce.bindRelationshipByWX(invitee, inviterId);
|
| | |
| | | // 邀请人ID -1.5.3新版
|
| | | Long inviterId = userInviteRecordService.getNewestInviterId(wxUnionId);
|
| | | if (inviterId == null) {
|
| | | throw new UserInfoExtraException(1, "没有对应的邀请关系");
|
| | | }
|
| | | |
| | | UserInfo boss = userInfoService.selectByPKey(inviterId);
|
| | | if (boss == null || boss.getState() != UserInfo.STATE_NORMAL) {
|
| | | throw new UserInfoExtraException(1, "没有对应的邀请关系");
|
| | | }
|
| | |
|
| | |
| | | if (inviter == null)
|
| | | throw new UserInfoExtraException(1, "上级邀请码不存在");
|
| | |
|
| | | if (inviter.getState() != UserInfo.STATE_NORMAL) {
|
| | | throw new UserInfoExtraException(1, "上级邀请码不存在");
|
| | | }
|
| | |
|
| | | return inviter;
|
| | | }
|
| | |
|
| | |
| | | if (inviter == null) {
|
| | | throw new UserInfoExtraException(1, "对应的邀请关系不存在");
|
| | | }
|
| | | |
| | | if (inviter.getState() != UserInfo.STATE_NORMAL) {
|
| | | throw new UserInfoExtraException(1, "对应的邀请关系不存在");
|
| | | }
|
| | | |
| | | return inviter;
|
| | | }
|
| | |
|