yujian
2019-08-14 8e751a7ee99afce71ac615a6111228c5c785ee46
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -121,40 +121,6 @@
      
      // 组织数据
      JSONObject resultData = organizeTeam(count, listTeam, uid, type);
      resultData.put("helpLink", configService.get("team_help_url"));
      boolean hasCode = false;
      boolean bdWeiXin = false;
      UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
      if (userInfoExtra != null) {
         if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode()))
            hasCode = true;
         if (!StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin()))
            bdWeiXin = true;
      }
      // 未激活邀请码
      if (!hasCode) {
         resultData.put("helpLinkActivate", configService.get("team_help_url"));
         resultData.put("tipCode", "激活邀请功能后才可以邀请队员,一级队员是由你直接邀请,二级队员是由你的一级队员邀请。\r\n邀请激活功能,必须要有邀请码,邀请码可以通过金币兑换,也可以全网搜索。");
      }
      resultData.put("hasCode", hasCode);
      // 未添加微信号
      if (!bdWeiXin) {
         resultData.put("tipWeiXin", "添加微信号后,你的邀请人和一级队员可通过微信号与你建立联系;\r\n你也可以向邀请人学习或向一级队员教授赚钱技巧。");
      }
      resultData.put("bdWeiXin", bdWeiXin);
      // 安卓返回统计数据
      String platform = acceptData.getPlatform();
      if ("android".equalsIgnoreCase(platform)) {
         JSONObject bossData = getBossInfo(acceptData, uid, threeSaleSerivce.getMyBoss(uid));
         resultData.put("boss", bossData);
         resultData.put("firstTeam", threeSaleSerivce.countFirstTeam(uid, 1));
         resultData.put("secondTeam", threeSaleSerivce.countSecondTeam(uid, 1));
      }
      out.print(JsonUtil.loadTrueResult(resultData));
   }
   
@@ -267,6 +233,37 @@
      resultData.put("firstTeamTotal", threeSaleSerivce.countFirstTeam(uid, null));
      resultData.put("secondTeam", threeSaleSerivce.countSecondTeam(uid, 1));
      resultData.put("secondTeamTotal", threeSaleSerivce.countSecondTeam(uid, null));
      boolean hasCode = false;
      boolean bdWeiXin = false;
      UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
      if (userInfoExtra != null) {
         if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode()))
            hasCode = true;
         if (!StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin()))
            bdWeiXin = true;
      }
      List<String> tipCode = new ArrayList<String>();
      // 未激活邀请码
      if (!hasCode) {
         resultData.put("helpLinkActivate", configService.get("team_help_url"));
         tipCode.add("激活邀请功能后才可以邀请队员,一级队员是由你直接邀请,二级队员是由你的一级队员邀请。");
         tipCode.add("邀请激活功能,必须要有邀请码,邀请码可以通过金币兑换,也可以全网搜索。");
      }
      resultData.put("hasCode", hasCode);
      resultData.put("tipCode", tipCode);
      // 未添加微信号
      List<String> tipWeiXin = new ArrayList<String>();
      if (!bdWeiXin) {
         tipWeiXin.add("添加微信号后,你的邀请人和一级队员可通过微信号与你建立联系;");
         tipWeiXin.add("你也可以向邀请人学习或向一级队员教授赚钱技巧。");
      }
      resultData.put("tipWeiXin", tipWeiXin);
      resultData.put("bdWeiXin", bdWeiXin);
      out.print(JsonUtil.loadTrueResult(resultData));
   }