yujian
2020-05-23 28cf328a098334b51a3e9d2d56f983fb8c862211
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -1299,7 +1299,14 @@
      if (activeTime == null) {
         activeTime = new Date(user.getCreatetime());
      }
      String inviteCode = "";
      if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode()))
         inviteCode = userInfoExtra.getInviteCode();
      if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip()))
         inviteCode = userInfoExtra.getInviteCodeVip();
      data.put("inviteCode", inviteCode);
      data.put("weixin", StringUtil.isNullOrEmpty(weixin) ? "" : weixin);
      data.put("loginTime", TimeUtil.formatDate(activeTime));
@@ -1311,27 +1318,16 @@
         data.put("taobao", false);
      }
      UserVIPPreInfo userVIPPreInfo = userVIPPreInfoService.getLatestProcessInfo(fansId);
      if (userVIPPreInfo != null) {
         String levelName = null;
         Integer process = userVIPPreInfo.getProcess();
         if (process == UserVIPPreInfo.PROCESS_2) {
            levelName = "高级会员";
         } else if (process == UserVIPPreInfo.PROCESS_3) {
            levelName = "超级会员";
         } else if (process == UserVIPPreInfo.PROCESS_4) {
            levelName = "资深导师";
         }
         Integer sourceType = userVIPPreInfo.getSourceType();
         if (sourceType != null && levelName != null) {
            if (sourceType == UserVIPPreInfo.SOURCE_TYPE_ORDER) {
               data.put("level", levelName += "(自购分享型)");
            } else if (sourceType == UserVIPPreInfo.SOURCE_TYPE_TEAM) {
               data.put("level", levelName += "(邀请团队型)");
            }
         }
      // 当前等级
      UserLevelEnum level = null;
      UserVIPLevel vipLevel = userInviteService.getVIPLevelByUid(fansId);
      if (vipLevel != null && vipLevel.getLevel() != null) {
         level = UserLevelUtil.getByLevel(vipLevel.getLevel());
      }
      if (level == null) {
         level = UserLevelEnum.daRen;
      }
      data.put("level", UserLevelUtil.getShowLevel(level));
      // 粉丝统计
      long indirectNum = 0;