Commit 8f5adc04 by Future

rtc记录

parent 417a65ce
package com.wecloud.im.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wecloud.im.entity.ImClient;
import com.wecloud.im.entity.ImRtcRecord;
import com.wecloud.im.param.rtc.CreateRtcChannelParam;
import com.wecloud.im.param.rtc.RtcRecordParam;
......@@ -18,7 +19,7 @@ public interface ImRtcRecordService extends BaseService<ImRtcRecord> {
* @param param
* @param channelId
*/
void createRtcRecord(CreateRtcChannelParam param, Long channelId);
void createRtcRecord(CreateRtcChannelParam param, Long channelId, ImClient currentClient);
/**
* 更新音视频记录
......
......@@ -31,15 +31,11 @@ import java.util.Date;
@Service
public class ImRtcRecordServiceImpl extends BaseServiceImpl<ImRtcRecordMapper, ImRtcRecord> implements ImRtcRecordService {
@Autowired
private ImClientService imClientService;
@Async
@Override
public void createRtcRecord(CreateRtcChannelParam param, Long channelId) {
public void createRtcRecord(CreateRtcChannelParam param, Long channelId, ImClient currentClient) {
try {
ImClient currentClient = imClientService.getCurrentClient();
ImRtcRecord rtcRecord = new ImRtcRecord();
rtcRecord.setId(SnowflakeUtil.getId());
rtcRecord.setFkAppid(currentClient.getFkAppid());
......
......@@ -120,7 +120,7 @@ public class RtcServiceImpl extends UserStateListener implements RtcService {
wsRtcWrite.rtcCall(rtcCallResponse, toClient.getId());
// 创建通话记录 todo 优化为mq推送
imRtcRecordService.createRtcRecord(createRtcChannelParam, createRtcChannelResult.getChannelId());
imRtcRecordService.createRtcRecord(createRtcChannelParam, createRtcChannelResult.getChannelId(), currentClient);
// TODO 待开发 下发安卓和ios系统推送
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment