Parcourir la source

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

pull/101/head
wanjing il y a 10 mois
Parent
révision
b4637cfe7c
2 fichiers modifiés avec 14 ajouts et 2 suppressions
  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 Voir le fichier

package com.tuoheng.admin.controller.callback; 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.DspCallbackRequest;
import com.tuoheng.admin.entity.request.third.DspRecordingCallbackRequest; import com.tuoheng.admin.entity.request.third.DspRecordingCallbackRequest;
import com.tuoheng.admin.service.third.dsp.IDspCallbackService; import com.tuoheng.admin.service.third.dsp.IDspCallbackService;
import com.tuoheng.common.core.utils.JsonResult; import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;


* @author 拓恒 * @author 拓恒
* @since 2021-09-01 * @since 2021-09-01
*/ */
@Slf4j
@RestController @RestController
@RequestMapping("/dsp/callback") @RequestMapping("/dsp/callback")
public class DspCallbackController { public class DspCallbackController {
} }


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

+ 9
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/callback/DspRecordingCallbackService.java Voir le fichier



import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.entity.domain.*; import com.tuoheng.admin.entity.domain.*;
* @return * @return
*/ */
public JsonResult callback(DspRecordingCallbackRequest request) { 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>() Business business = businessMapper.selectOne(new LambdaQueryWrapper<Business>()

Chargement…
Annuler
Enregistrer