admin
2019-09-16 49c585080b415f7d9d058cd907e102c41b0f3614
fanli/src/main/java/com/yeshi/fanli/controller/ClientJspController.java
@@ -38,7 +38,7 @@
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig;
import com.yeshi.fanli.exception.ShareGoodsException;
import com.yeshi.fanli.exception.share.ShareGoodsException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.config.BusinessSystemService;
@@ -149,42 +149,18 @@
      return "coupon";
   }
   //该方法以及废弃
   @Deprecated
   @RequestMapping("findThreeFriendsCount")
   public void findThreeFriendsCount(long id, String callback, PrintWriter out) {
      int count1 = userInfoService.findFriendsCount(id, 1);
      int count2 = userInfoService.findFriendsCount(id, 2);
      JSONObject data = new JSONObject();
      data.put("count1", count1);
      data.put("count2", count2);
      if (!StringUtil.isNullOrEmpty(callback)) {
         out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
      } else {
         out.print(JsonUtil.loadTrueResult(data));
      }
   }
   //该方法以及废弃
   @Deprecated
   @RequestMapping("findThreeFriends")
   public void findThreeFriends(long id, int type, int page, String callback, PrintWriter out) {
      int pageSize = 30;
      List<InviteUser> list = userInfoService.getFriendsList(id, type, page, pageSize);
      JSONArray array = new JSONArray();
      for (InviteUser user : list) {
         JSONObject item = JSONObject.fromObject(new GsonBuilder().create().toJson(user.getUserInfo()));
         item.put("valid", user.isValid());
         array.add(item);
      }
      long count = userInfoService.getFriendsListCount(id, type);
      JSONObject data = new JSONObject();
      data.put("list", array);
      data.put("pages", count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
      if (!StringUtil.isNullOrEmpty(callback)) {
         out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
      } else {
         out.print(JsonUtil.loadTrueResult(data));
      }
   }
   @RequestMapping(value = "getConpon", method = RequestMethod.POST)