yujian
2019-03-20 1e53e5f28c55ece70b28c752fa318e2fd951e643
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java
@@ -11,7 +11,6 @@
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.yeshi.utils.DateUtil;
import com.yeshi.fanli.dao.mybatis.user.UserInfoExtraMapper;
import com.yeshi.fanli.dao.mybatis.user.UserRankRecordMapper;
@@ -294,6 +293,14 @@
         throw new UserInfoExtraException(1, "用户id、邀请码不能为空");
      }
      
      UserInfoExtra extra = userInfoExtraMapper.getInfoExtraByUid(uid);
      if (extra != null) {
         String inviteCodeHas = extra.getInviteCode();
         if (inviteCodeHas != null && inviteCodeHas.trim().length() > 0) {
            throw new UserInfoExtraException(1, "已存在邀请码,请刷新页面");
         }
      }
      // 被邀请人信息
      UserInfo invitee = userInfoService.selectByPKey(uid);
      if (invitee == null) {
@@ -385,4 +392,11 @@
      return inviteCode;
   }
   
   @Override
   public long countByRankId(Long rankId) {
      return userInfoExtraMapper.countByRankId(rankId);
   }
}