liujc 1 年之前
父節點
當前提交
44296cf77c

+ 8 - 7
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/open/ImController.java

@@ -130,7 +130,8 @@ public class ImController extends BaseController {
 
     @ApiOperation("腾讯im 回调接口")
     @PostMapping(value = "/tencentImCallback")
-    public TencentImCallbackResult tencentImCallback(@RequestBody String body, HttpServletRequest request) {
+    public TencentImCallbackResult tencentImCallback(@RequestBody Object obj, HttpServletRequest request) {
+        String body = JSON.toJSONString(obj);
         log.info("tencentImCallback body:{}", body);
 
         LivePluginService pluginService = livePluginContext.getPluginService(TencentCloudLivePlugin.PLUGIN_NAME);
@@ -209,8 +210,8 @@ public class ImController extends BaseController {
 
     @ApiOperation("腾讯云直播-推流 回调接口")
     @PostMapping(value = "/tencentStreamEventCallback")
-    public TencentData.StreamEventCallbackResult tencentStreamEventCallback(@RequestBody String body) {
-
+    public TencentData.StreamEventCallbackResult tencentStreamEventCallback(@RequestBody Object obj) {
+        String body = JSON.toJSONString(obj);
         log.info("tencentStreamEventCallback body:{}", body);
 
         TencentData.CallbackStreamStateEvent event = TencentData.CallbackStreamStateEvent.from(body);
@@ -266,8 +267,8 @@ public class ImController extends BaseController {
 
     @ApiOperation("腾讯云直播-录制 回调接口")
     @PostMapping(value = "/tencentStreamRecordCallback")
-    public TencentData.StreamEventCallbackResult tencentStreamRecordCallback(@RequestBody String body) {
-
+    public TencentData.StreamEventCallbackResult tencentStreamRecordCallback(@RequestBody Object obj) {
+        String body = JSON.toJSONString(obj);
         log.info("tencentStreamRecordCallback body:{}", body);
 
         TencentData.CallbackSteamRecordEvent event = TencentData.CallbackSteamRecordEvent.from(body);
@@ -291,8 +292,8 @@ public class ImController extends BaseController {
 
     @ApiOperation("腾讯云直播-推流异常 回调接口")
     @PostMapping(value = "/tencentStreamExceptionCallback")
-    public TencentData.StreamEventCallbackResult tencentStreamExceptionCallback(@RequestBody String body) {
-
+    public TencentData.StreamEventCallbackResult tencentStreamExceptionCallback(@RequestBody Object obj) {
+        String body = JSON.toJSONString(obj);
         log.info("tencentStreamExceptionCallback body:{}", body);
 
         return TencentData.StreamEventCallbackResult.builder().code(0).build();