增加腾讯音视频上传完成回调成功日志及修改mapper
This commit is contained in:
@@ -93,4 +93,12 @@ public interface HyPartnerInterviewMapper {
|
||||
* @return
|
||||
*/
|
||||
String getStatus(String interviewPlanId);
|
||||
|
||||
/**
|
||||
* 在面试信息表中添加面试录制视频链接
|
||||
* @param roomId
|
||||
* @param videoUrl
|
||||
*/
|
||||
void addVideoUrl(@Param("roomId") String roomId, @Param("videoUrl") String videoUrl);
|
||||
|
||||
}
|
||||
@@ -478,4 +478,15 @@
|
||||
WHERE interview_plan_id = #{interviewPlanId}
|
||||
</select>
|
||||
|
||||
<!-- 根据 room_id 添加 process_info -->
|
||||
<update id="addVideoUrl">
|
||||
UPDATE hy_partner_interview
|
||||
SET process_info = IF(process_info IS NULL, #{videoUrl}, CONCAT(process_info, ',' ,#{videoUrl}))
|
||||
WHERE interview_plan_id = (
|
||||
SELECT id
|
||||
FROM hy_partner_interview_plan
|
||||
WHERE room_id = #{roomId}
|
||||
)
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -3,7 +3,6 @@ package com.cool.store.service.impl;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.cool.store.dao.HyInterviewDAO;
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
@@ -19,7 +18,6 @@ import com.cool.store.request.ModifyInterviewTimeReq;
|
||||
import com.cool.store.service.PartnerInterviewService;
|
||||
import com.cool.store.utils.TRTCUtils;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.EnterpriseUserBaseInfoVO;
|
||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
||||
import com.cool.store.vo.PartnerPassLetterDetailVO;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.mapper.TRTCVideoCallBackMapper;
|
||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||
import com.cool.store.request.TRTCVideoCallBackReq;
|
||||
import com.cool.store.service.TRTCVideoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
|
||||
public class TRTCVideoServiceImpl implements TRTCVideoService {
|
||||
|
||||
@Autowired
|
||||
private TRTCVideoCallBackMapper videoCallBackMapper;
|
||||
private HyPartnerInterviewMapper interviewMapper;
|
||||
|
||||
/**
|
||||
* 音视频上传成功后的回调处理
|
||||
@@ -20,7 +20,7 @@ public class TRTCVideoServiceImpl implements TRTCVideoService {
|
||||
//将视频播放地址拼接到对应的面试信息字段中
|
||||
String videoUrl = req.getEventInfo().getPayLoad().getTencentVod().getVideoUrl();
|
||||
String roomId = req.getEventInfo().getRoomId();
|
||||
videoCallBackMapper.addVideoUrl(roomId, videoUrl);
|
||||
interviewMapper.addVideoUrl(roomId, videoUrl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ public class VideoController {
|
||||
@PostMapping("/callback")
|
||||
@ApiOperation("音视频回调(腾讯云回调)")
|
||||
public ResponseResult videoCallback(@RequestBody String requestBody) {
|
||||
log.info("腾讯音视频上传完成回调,request{}", JSONObject.toJSONString(requestBody));
|
||||
//由于腾讯云恶事做尽,它的回调参数不是驼峰法,首字母是大写,导致 SpringMVC 映射不上,只能手动映射了
|
||||
TRTCVideoCallBackReq req = JSONObject.parseObject(requestBody, TRTCVideoCallBackReq.class);
|
||||
//不是音视频上传的回调
|
||||
|
||||
Reference in New Issue
Block a user