This commit is contained in:
77
2024-04-15 14:55:02 +08:00
parent 557f246b6c
commit 49969476ce
2 changed files with 11 additions and 2 deletions

View File

@@ -1,9 +1,10 @@
package com.ruoyi.cai.trd;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.yunxin.util.RestTemplateUtil;
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -13,6 +14,7 @@ import org.springframework.stereotype.Component;
import java.util.*;
@Component
@Slf4j
public class Agora {
@Autowired
@@ -54,7 +56,8 @@ public class Agora {
headers.setContentType(MediaType.APPLICATION_JSON);
headers.set("Authorization", getAuthorizationHeader());
HttpEntity httpEntity = new HttpEntity<>(bodyData, headers);
RestTemplateUtil.restTemplate.postForObject(url, httpEntity, JSONObject.class);
JSONObject jsonObject = RestTemplateUtil.restTemplate.postForObject(url, httpEntity, JSONObject.class);
log.info("执行关闭房间号操作roomId={}response={}",roomId, JSON.toJSONString(jsonObject));
}
}