移除错误方法

This commit is contained in:
648540858
2024-12-13 15:09:50 +08:00
parent 59f1ab4e77
commit 3769e70094
4 changed files with 4 additions and 23 deletions

View File

@@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.service.redisMsg.control;
import com.alibaba.fastjson2.JSONObject;
import com.genersoft.iot.vmp.common.InviteInfo;
import com.genersoft.iot.vmp.common.InviteSessionType;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
@@ -19,7 +18,6 @@ import com.genersoft.iot.vmp.service.redisMsg.dto.RedisRpcMapping;
import com.genersoft.iot.vmp.service.redisMsg.dto.RpcController;
import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;

View File

@@ -18,7 +18,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.sip.message.Response;
import java.util.concurrent.TimeUnit;
@Slf4j
@@ -141,23 +140,5 @@ public class RedisRpcPlayServiceImpl implements IRedisRpcPlayService {
}
}
}
@Override
public void stop(String serverId, InviteSessionType type, int channelId, String stream) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("channelId", channelId);
jsonObject.put("stream", stream);
jsonObject.put("inviteSessionType", type);
RedisRpcRequest request = buildRequest("channel/stop", jsonObject.toJSONString());
request.setToId(serverId);
RedisRpcResponse response = redisRpcConfig.request(request, 50);
if (response == null) {
throw new ControllerException(ErrorCode.ERROR100.getCode(), ErrorCode.ERROR100.getMsg());
}else {
if (response.getStatusCode() != Response.OK) {
throw new ControllerException(ErrorCode.ERROR100.getCode(), ErrorCode.ERROR100.getMsg());
}
}
}
}