yujian
2020-04-01 e76b8179de1cd0ea836b0c2bf7278015e71b9e71
Merge branch 'div' into div-1
1个文件已修改
21 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java
@@ -356,7 +356,7 @@
        inviteCode = inviteCode.toUpperCase();
        // 邀请码对应用户信息
        UserInfo inviter = userInfoService.getUserInfoByInviteCode(inviteCode);
        if (inviter == null)
        if (inviter == null || inviter.getState() != UserInfo.STATE_NORMAL)
            throw new UserInfoExtraException(1, "上级邀请码不存在");
        // 绑定关系
@@ -479,6 +479,11 @@
        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, "没有对应的邀请关系");
        }
        // 绑定关系
        try {
@@ -600,6 +605,11 @@
        // 邀请人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, "没有对应的邀请关系");
        }
@@ -782,6 +792,10 @@
        UserInfo inviter = userInfoService.getUserInfoByInviteCode(inviteCode);
        if (inviter == null)
            throw new UserInfoExtraException(1, "上级邀请码不存在");
        if (inviter.getState() != UserInfo.STATE_NORMAL) {
            throw new UserInfoExtraException(1, "上级邀请码不存在");
        }
        return inviter;
    }
@@ -828,6 +842,11 @@
        if (inviter == null) {
            throw new UserInfoExtraException(1, "对应的邀请关系不存在");
        }
        if (inviter.getState() != UserInfo.STATE_NORMAL) {
            throw new UserInfoExtraException(1, "对应的邀请关系不存在");
        }
        return inviter;
    }