yujian
2019-08-15 8e5fb7b57899c25ff0e5fe251f684691039f72e0
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -29,7 +29,6 @@
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -71,6 +70,7 @@
         JSONObject data = new JSONObject();
         data.put("nickName", userInfo.getNickName());
         data.put("portrait", userInfo.getPortrait());
         data.put("tips", "确认要成为TA的一级队员吗?邀请关系一旦建立不可更改。");
         out.print(JsonUtil.loadTrueResult(data));
      } catch (UserInfoExtraException e) {
         out.print(JsonUtil.loadFalseResult(e.getMsg()));
@@ -89,6 +89,7 @@
         JSONObject data = new JSONObject();
         data.put("nickName", userInfo.getNickName());
         data.put("portrait", userInfo.getPortrait());
         data.put("tips", "确认要成为TA的一级队员吗?邀请关系一旦建立不可更改。");
         out.print(JsonUtil.loadTrueResult(data));
      } catch (UserInfoExtraException e) {
         out.print(JsonUtil.loadFalseResult(e.getMsg()));
@@ -227,12 +228,21 @@
   public void countMyTeam(AcceptData acceptData, long uid, PrintWriter out) {
      JSONObject bossData = getBossInfo(acceptData, uid, threeSaleSerivce.getMyBoss(uid));
      JSONObject resultData = new JSONObject();
      long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1);
      resultData.put("boss", bossData);
      resultData.put("helpLink", configService.get("team_help_url"));
      resultData.put("firstTeam", threeSaleSerivce.countFirstTeam(uid, 1));
      resultData.put("firstTeam", firstTeam);
      resultData.put("firstTeamTotal", threeSaleSerivce.countFirstTeam(uid, null));
      resultData.put("secondTeam", threeSaleSerivce.countSecondTeam(uid, 1));
      resultData.put("secondTeamTotal", threeSaleSerivce.countSecondTeam(uid, null));
      boolean hasTeam = true;
      if (firstTeam <= 0) {
         hasTeam = false;
         resultData.put("invitelink", configService.get("invite_activation_url"));
      }
      resultData.put("hasTeam", hasTeam);
      
      boolean hasCode = false;
      boolean bdWeiXin = false;
@@ -245,15 +255,15 @@
            bdWeiXin = true;
      }
      
      List<String> tipCode = new ArrayList<String>();
      // 未激活邀请码
      resultData.put("hasCode", hasCode);
      if (!hasCode) {
         List<String> tipCode = new ArrayList<String>();
         resultData.put("helpLinkActivate", configService.get("team_help_url"));
         tipCode.add("激活邀请功能后才可以邀请队员,一级队员是由你直接邀请,二级队员是由你的一级队员邀请。");
         tipCode.add("邀请激活功能,必须要有邀请码,邀请码可以通过金币兑换,也可以全网搜索。");
         resultData.put("tipCode", tipCode);
      }
      resultData.put("hasCode", hasCode);
      resultData.put("tipCode", tipCode);
      
      // 未添加微信号
      List<String> tipWeiXin = new ArrayList<String>();