yujian
2020-01-01 d3abe5706d231a938ebf4b551208d69d11265736
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -211,7 +211,7 @@
      }
      boolean needVIPInfo = false;
      if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
      if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
         needVIPInfo = true;
      // 组织数据
@@ -370,7 +370,7 @@
    */
   @RequestMapping(value = "countMyTeam", method = RequestMethod.POST)
   public void countMyTeam(AcceptData acceptData, long uid, PrintWriter out) {
      JSONObject bossData = getBossInfo(acceptData, uid, threeSaleSerivce.getMyBoss(uid));
      JSONObject bossData = getBossInfo(uid, threeSaleSerivce.getMyBoss(uid));
      JSONObject resultData = new JSONObject();
      long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1);
@@ -423,6 +423,23 @@
   }
   /**
    * 获取用户信息
    * @param acceptData
    * @param uid
    * @param out
    */
   @RequestMapping(value = "getBossInfo", method = RequestMethod.POST)
   public void getBossInfo(AcceptData acceptData, Long uid, PrintWriter out) {
      if (uid == null || uid <= 0) {
         out.print(JsonUtil.loadFalseResult("用户未登录"));
         return;
      }
      JSONObject bossData = getBossInfo(uid, threeSaleSerivce.getMyBoss(uid));
      out.print(JsonUtil.loadTrueResult(bossData));
   }
   /**
    * 上级信息组织
    * 
    * @param acceptData
@@ -430,7 +447,7 @@
    * @param threeSale
    * @return
    */
   private JSONObject getBossInfo(AcceptData acceptData, long uid, ThreeSale threeSale) {
   private JSONObject getBossInfo(long uid, ThreeSale threeSale) {
      JSONObject bossData = new JSONObject();
      if (threeSale != null && threeSale.getBoss() != null) {
         UserInfo boss = threeSale.getBoss();
@@ -608,4 +625,28 @@
         out.print(JsonUtil.loadFalseResult("邀请信息获取失败"));
      }
   }
   /**
    * 站内信提醒队员添加微信号
    *
    * @param acceptData
    * @param uid
    * @param inviteId
    * @param out
    */
   @RequestMapping(value = "tailorCode")
   public void tailorCode(AcceptData acceptData, String callback, Long uid, PrintWriter out) {
      if (uid == null) {
         JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户id缺失"));
         return;
      }
      JSONObject data = new JSONObject();
      data.put("num", threeSaleSerivce.countFirstTeam(uid, 1));
      data.put("limit", Constant.INVITE_CODRE_TAILOR_LIMIT);
      JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
   }
}