package cn.com.ctop.kuaishou.modules.batch.mapper;

import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouProjectVideoGet;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * 快手-项目下视频信息
 *
 * @author: jeecg-boot
 * @date: 2021-05-21
 * @cersion: V1.0
 */
public interface KuaishouProjectVideoGetMapper extends BaseMapper<KuaishouProjectVideoGet> {

    void replaceBatch(@Param("dataList") List<KuaishouProjectVideoGet> list);

    String queryLatestUpdateTime(@Param("projectId") Long projectId);

    Long queryPageListTotal(KuaishouProjectVideoGet kuaishouProjectVideoGet);

    List<KuaishouProjectVideoGet> queryPageList(KuaishouProjectVideoGet kuaishouProjectVideoGet);

    JSONObject getVideoTotalNumber(Map<String, Object> paramsMap);

    JSONObject getVideoDetails(@Param("signature") String signature, @Param("id") String id);

    Long getAccountVideosTotal(@Param("signature") String signature, @Param("projectId") Long projectId);

    List<JSONObject> getAccountVideos(@Param("signature") String signature, @Param("projectId") Long projectId);

    List<KuaiShouVideoGet> getNewVideoBetweenTime(@Param("accountId") Long accountId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("channelType") Integer channelType);

    List<KuaiShouVideoGet> getZeroVideoByParams(@Param("accountId") Long accountId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("videoCnt") Long videoCnt, @Param("appVersion") String appVersion, @Param("channelType") Integer channelType, @Param("relativeCnt") Integer relativeCnt);

    List<KuaiShouVideoGet> getHistoryTopVideoByParams(@Param("accountId") Long accountId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("videoCnt") Long videoCnt, @Param("appVersion") String appVersion, @Param("channelType") Integer channelType);
}
