| | |
| | | }
|
| | |
|
| | | @RequestMapping("findThreeFriendsCount")
|
| | | public void findThreeFriendsCount(long id, PrintWriter out) {
|
| | | 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);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | } else {
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping("findThreeFriends")
|
| | | public void findThreeFriends(long id, int type, int page, PrintWriter out) {
|
| | | 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();
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("list", array);
|
| | | data.put("pages", count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | if (!StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | } else {
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping("findThreeSales")
|