package com.platform.modules.live.service;

import com.baomidou.mybatisplus.service.IService;
import com.platform.common.utils.R;
import com.platform.modules.foreign.entity.SceneStreamForeignEntity;
import com.platform.modules.live.entity.LiveSceneLiveInfoEntity;
import com.platform.modules.live.entity.LiveSceneLiveInfoRecordEntity;
import com.platform.modules.live.vo.LiveCasterSubVo;
import com.platform.modules.live.vo.LiveInfoVo;

import java.util.List;

/**
 * 现场直播信息表
 * 
 * @author TROY
 * @email 
 * @date 2019-01-19 14:50:50
 */
public interface LiveSceneLiveInfoService extends IService<LiveSceneLiveInfoEntity> {

	void save(LiveSceneLiveInfoEntity liveSceneLiveInfo);

	void saveOrUpdate(Integer sceneId, List<Integer> userIdList);

	void update(LiveSceneLiveInfoEntity liveSceneLiveInfo);

	void delete(Integer id);

	void deleteBatch(Integer[] ids);

	R startScenePush(Integer userId, Integer sceneId);

	R stopScenePush(Integer userId, Integer sceneId);

    List<LiveCasterSubVo> selectListBySceneId(Integer sceneId);

	LiveSceneLiveInfoEntity findLiveInfoByPushDomainAppAndStream(String domain, String appName, String treamName);

	LiveSceneLiveInfoEntity findLiveInfoByLiveDomainAppAndStream(String domain, String appName, String treamName);

	void saveLiveInfoRecord(LiveSceneLiveInfoRecordEntity liveInfoRecord);

	void updateLiveState(LiveSceneLiveInfoEntity liveInfoEntity, String action, Integer time);

	List<SceneStreamForeignEntity> selectLiveInfoForeign(Integer sceneId);

	void priority(Integer[] ids,Integer[] prioritys);

	boolean existInfo(Integer sceneId, Integer userId);

	List<LiveInfoVo> selectOnlineLiveStreamList(Integer sceneId, Integer pushState);

	List<LiveSceneLiveInfoEntity> selectLiveInfoByInfoType(Integer sceneId, Integer infoType);

}
