package com.fs.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.common.annotation.DataSource;
import com.fs.common.enums.DataSourceType;
import com.fs.course.domain.FsCoursePlaySourceConfig;
import com.fs.course.vo.FsCoursePlaySourceConfigVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface FsCoursePlaySourceConfigMapper extends BaseMapper<FsCoursePlaySourceConfig> {

    /**
     * 查询点播配置列表
     */
    List<FsCoursePlaySourceConfigVO> selectCoursePlaySourceConfigVOListByMap(@Param("params") Map<String, Object> params);

    @DataSource(DataSourceType.SLAVE)
    FsCoursePlaySourceConfig selectCoursePlaySourceConfigByAppId(String appId);

    /**
     * 更新点播播放源配置，company_ids 不做非空判断，允许置为 NULL
     */
    int updateCoursePlaySourceConfig(FsCoursePlaySourceConfig config);
}
