|
|
@@ -1634,7 +1634,7 @@ public class OpenIMServiceImpl implements OpenIMService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public OpenImResponseDTO getFriendApplyList(String userID, int pageNumber, int showNumber) {
|
|
|
+ public OpenImResponseDTO getFriendList(String userID, int pageNumber, int showNumber,Integer applyType) {
|
|
|
String adminToken = getAdminToken();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
@@ -1642,14 +1642,34 @@ public class OpenIMServiceImpl implements OpenIMService {
|
|
|
map.put("showNumber", showNumber);
|
|
|
jsonObject.put("userID",userID);
|
|
|
jsonObject.put("pagination",map);
|
|
|
- String body = HttpRequest.post(IMConfig.URL+"/friend/get_friend_apply_list")
|
|
|
- .header("operationID", String.valueOf(System.currentTimeMillis()))
|
|
|
- .header("token", adminToken)
|
|
|
- .body(jsonObject.toString())
|
|
|
- .execute()
|
|
|
- .body();
|
|
|
- OpenImResponseDTO responseDTO= JSONUtil.toBean(body,OpenImResponseDTO.class);
|
|
|
- return responseDTO;
|
|
|
-
|
|
|
+ if (applyType == 1){
|
|
|
+ String body = HttpRequest.post(IMConfig.URL+"/friend/get_friend_list")
|
|
|
+ .header("operationID", String.valueOf(System.currentTimeMillis()))
|
|
|
+ .header("token", adminToken)
|
|
|
+ .body(jsonObject.toString())
|
|
|
+ .execute()
|
|
|
+ .body();
|
|
|
+ OpenImResponseDTO responseDTO= JSONUtil.toBean(body,OpenImResponseDTO.class);
|
|
|
+ return responseDTO;
|
|
|
+ }else if (applyType == 2){
|
|
|
+ String body = HttpRequest.post(IMConfig.URL+"/friend/get_self_friend_apply_list")
|
|
|
+ .header("operationID", String.valueOf(System.currentTimeMillis()))
|
|
|
+ .header("token", adminToken)
|
|
|
+ .body(jsonObject.toString())
|
|
|
+ .execute()
|
|
|
+ .body();
|
|
|
+ OpenImResponseDTO responseDTO= JSONUtil.toBean(body,OpenImResponseDTO.class);
|
|
|
+ return responseDTO;
|
|
|
+ }else if (applyType == 3){
|
|
|
+ String body = HttpRequest.post(IMConfig.URL+"/friend/get_friend_apply_list")
|
|
|
+ .header("operationID", String.valueOf(System.currentTimeMillis()))
|
|
|
+ .header("token", adminToken)
|
|
|
+ .body(jsonObject.toString())
|
|
|
+ .execute()
|
|
|
+ .body();
|
|
|
+ OpenImResponseDTO responseDTO= JSONUtil.toBean(body,OpenImResponseDTO.class);
|
|
|
+ return responseDTO;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
}
|
|
|
}
|