|
|
@ -479,6 +479,30 @@ class AgentService extends AdminBaseService |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 删除直播间 |
|
|
|
public function awsIvsDelete($param) |
|
|
|
{ |
|
|
|
try { |
|
|
|
if (empty($param['id'])) { |
|
|
|
return $this->toData('400', 'Missing param id'); |
|
|
|
} |
|
|
|
// 获取直播间配置信息 |
|
|
|
$info = AwsIvsModel::where(['id'=>$param['id']])->find(); |
|
|
|
if (empty($info)) { |
|
|
|
return $this->toData('500', '操作的数据不存在'); |
|
|
|
} |
|
|
|
// 请求chat服务,删除对应信息 |
|
|
|
$chatFriendsUrl = env('CHAT_SERVER.BASE_URL') . '/api/group/delete/'.$info->agent_chat_group_id; |
|
|
|
$chatFriendsRes = (new \app\utility\RequestChatServer())->ReqChatServer($chatFriendsUrl, []); |
|
|
|
Log::info("删除直播间结果:".json_encode($chatFriendsRes)); |
|
|
|
// 删除直播间配置信息 |
|
|
|
$res = $info->delete(); |
|
|
|
return $this->toData('0', 'success', [$res]); |
|
|
|
} catch (\Exception $e) { |
|
|
|
return $this->toData('500', '系统异常 请稍后重试', [$e->getMessage(), $e->getTrace()]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 代理下每个渠道的用户注册列表 |
|
|
|
public function userListByChannel($param) |
|
|
|
{ |
|
|
|