|
|
@@ -475,6 +475,38 @@ public class OpenIMServiceImpl implements OpenIMService {
|
|
|
|
|
|
return responseDTO;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public OpenImResponseDTO deleteUserInfo(String ownerUserID,String friendUserID) {
|
|
|
+ OpenImResponseDTO responseDTO = null;
|
|
|
+ String adminToken = getAdminToken();
|
|
|
+ //删除好友
|
|
|
+ Map<String, Object> bodyMap = new HashMap<>();
|
|
|
+ bodyMap.put("ownerUserID", ownerUserID);
|
|
|
+ bodyMap.put("friendUserID", friendUserID);
|
|
|
+ String jsonBody1 = JSONUtil.toJsonStr(bodyMap);
|
|
|
+ String result1 = HttpRequest.post(IMConfig.URL+"/friend/delete_friend")
|
|
|
+ .header("operationID", String.valueOf(System.currentTimeMillis()))
|
|
|
+ .header("token", adminToken)
|
|
|
+ .body(jsonBody1)
|
|
|
+ .execute()
|
|
|
+ .body();
|
|
|
+
|
|
|
+ //增加黑名单
|
|
|
+ Map<String, Object> bodyMap1 = new HashMap<>();
|
|
|
+ bodyMap1.put("ownerUserID", ownerUserID);
|
|
|
+ bodyMap1.put("blackUserID", friendUserID);
|
|
|
+ String jsonBody2 = JSONUtil.toJsonStr(bodyMap1);
|
|
|
+ String result2 = HttpRequest.post(IMConfig.URL+"/friend/add_black")
|
|
|
+ .header("operationID", String.valueOf(System.currentTimeMillis()))
|
|
|
+ .header("token", adminToken)
|
|
|
+ .body(jsonBody2)
|
|
|
+ .execute()
|
|
|
+ .body();
|
|
|
+ responseDTO= JSONUtil.toBean(result2,OpenImResponseDTO.class);
|
|
|
+ return responseDTO;
|
|
|
+ }
|
|
|
+
|
|
|
@Data
|
|
|
public static class UpdateUserInfo {
|
|
|
private String userID;
|