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 cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description: 快手-获取视频接口
 * @Author: jeecg-boot
 * @Date: 2019-07-25
 * @Version: V1.0
 */
public interface KuaiShouVideoGetMapper extends BaseMapper<KuaiShouVideoGet> {

    void replaceBatch(@Param(value = "videos") List<KuaiShouVideoGet> videoGets);

    List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap);

    List<KuaiShouVideoGet> getHighQualityVideo(long accountId, int days, int num);

    List<KuaiShouVideoGet> selectPhotoIdsByAccountId(Long accountId);

    List<JSONObject> getVideoListByMap(Map<String, Object> requestMap);

    List<KuaiShouVideoGet> getPhotoIdsByParams(Long accountId, String signature);

    void etlVideoBaseInfoByStaDate(@Param("statDate") String statDate);

    List<JSONObject> getVideoInfoByPhotoIds(@Param("photoIdList") List<Long> photoIdList);

    Integer getTotalCountByAccount(@Param("accountId") Long accountId);

    Integer getTotalCountByAccountAndStatDate(@Param("accountId") Long accountId, @Param("statDate") String statDate);

    Integer getEffectiveCountByAccountId(Long accountId);

    Integer getHotMoneyCountByAccountId(Long accountId);

    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);

    List<KuaishouProjectVideoGet> selectProjectVideo(@Param("projectId") Long projectId, @Param("updateTime") String updateTime);

    void updateBatch(@Param(value = "videoGetList") List<KuaiShouVideoGet> videoGetList);

    List<JSONObject> getAccountIds();

    List<String> queryPhotoIdsByProjectAndMd5(@Param("projectId") Long projectId, @Param("signature") String signature, @Param("accountId") JSONArray accountId);

    JSONObject getVideoByPhotoIdAndAccountId(@Param("accountId") Long accountId,@Param("photoId") Long photoId);

    List<JSONObject> getVideoListByDate(@Param("date") String date);

    List<String> getDateList();
}
