package org.jeecg.modules.bytedance.advertise.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.bytedance.advertise.entity.ByteDanceVideoInfo;

import java.util.List;

/**
 * @Description: 今日头条视频素材信息
 * @Author: jeecg-boot
 * @Date: 2019-07-29
 * @Version: V1.0
 */
public interface ByteDanceVideoInfoMapper extends BaseMapper<ByteDanceVideoInfo> {
    void replaceBatch(@Param(value = "videoList") List<ByteDanceVideoInfo> videoInfoList);
    void updateVideoVerticalType();
    void updateVideoHorizonType();

    /**
     * 查询规定时间段内尚未创建创意的素材信息
     * @param accountId
     * @param startTime
     * @param endTime
     * @param videoCnt
     * @return
     */
    List<ByteDanceVideoInfo> getNewVideoByParams(@Param(value = "projectId") Long projectId,@Param(value = "accountId") Long accountId, @Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "creativeCnt")Long creativeCnt,@Param(value = "now") String now);

    List<ByteDanceVideoInfo> topMatByParams(@Param(value = "projectId")Long projectId, @Param(value = "accountId")Long accountId, @Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "now") String now);

    List<ByteDanceVideoInfo>historyMatByParams(@Param(value = "projectId")Long projectId, @Param(value = "accountId")Long accountId, @Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "videoCnt")Long videoCnt,@Param(value = "now") String now);
}
