StopController.class.php 742 Bytes
<?php
/**
 * Created by PhpStorm.
 * User: zhoutao
 * Date: 2018/1/17
 * Time: 下午7:00
 */

namespace Apicp\Controller\LiveRoom;

use Common\Common\Constant;
use Common\Service\MainService;

class StopController extends AbstractController
{
    /**
     * Stop
     * @author zhoutao
     * @desc 结束直播接口
     * @param Int lm_id:true:1 直播活动ID
     * @return array|bool
     */
    public function Index()
    {
        // 已经是结束了
        if ($this->liveMainDetail['live_status'] == Constant::LIVE_STATUS_OVER) {
            E('_ERR_LIVE_ROOM_IS_DISABLED');
        }

        $mainServ = new MainService();
        $mainServ->endLive($this->liveMainDetail, $this->studioDetail);

        return true;
    }
}