admin
2020-04-01 c70caa91e6b0e1f944b148b55685aca43bb90783
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;
   }