瀏覽代碼

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

pull/101/head
wanjing 10 月之前
父節點
當前提交
b4637cfe7c
共有 2 個檔案被更改,包括 14 行新增2 行删除
  1. +5
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/DspCallbackController.java
  2. +9
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/callback/DspRecordingCallbackService.java

+ 5
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/DspCallbackController.java 查看文件

@@ -1,9 +1,11 @@
package com.tuoheng.admin.controller.callback;

import com.alibaba.fastjson.JSONObject;
import com.tuoheng.admin.entity.request.third.DspCallbackRequest;
import com.tuoheng.admin.entity.request.third.DspRecordingCallbackRequest;
import com.tuoheng.admin.service.third.dsp.IDspCallbackService;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@@ -17,6 +19,7 @@ import javax.validation.constraints.Pattern;
* @author 拓恒
* @since 2021-09-01
*/
@Slf4j
@RestController
@RequestMapping("/dsp/callback")
public class DspCallbackController {
@@ -38,13 +41,14 @@ public class DspCallbackController {
}

/**
* 视频地址回调接口
* 录制视频地址回调接口
*
* @param request 回调请求体
* @return JsonResult
*/
@PostMapping("/recording")
public JsonResult recordingCallBack(@Valid @RequestBody DspRecordingCallbackRequest request) {
log.info("DSP服务回调地址接收成功, 录制视频,request:{}", JSONObject.toJSONString(request));
return dspCallbackService.recordingCallbackData(request);
}
}

+ 9
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/callback/DspRecordingCallbackService.java 查看文件

@@ -2,6 +2,7 @@ package com.tuoheng.admin.service.third.dsp.callback;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.entity.domain.*;
@@ -52,7 +53,14 @@ public class DspRecordingCallbackService {
* @return
*/
public JsonResult callback(DspRecordingCallbackRequest request) {
log.info("DSP服务回调地址接收成功, request:{}", request);
if (ObjectUtil.isEmpty(request)) {
log.info("DSP服务回调地址接收成功, 数据为空");
return JsonResult.success("DSP服务回调地址接收成功, 数据为空");
}
if (StringUtils.isEmpty(request.getRecordingVideoUrl())) {
log.info("DSP服务回调地址接收成功, 录屏视频地址为空");
return JsonResult.success("DSP服务回调地址接收成功, 录屏视频地址为空");
}

// 查询业务表数据
Business business = businessMapper.selectOne(new LambdaQueryWrapper<Business>()

Loading…
取消
儲存