package cn.com.ctop.material.mapper;

import cn.com.ctop.material.entity.MaterialUploadTask;
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;

/**
 * 同步素材任务
 *
 * @author jeecg-boot
 * 2021-10-21
 * @version V1.0
 */
public interface MaterialUploadTaskMapper extends BaseMapper<MaterialUploadTask> {

    List<Integer> getMediaList(@Param("signature") String signature);

    String getTokenByAccountId(@Param("accountId") Long accountId);

    JSONObject getVideoSize(String signature);

    void updateStatusById(@Param("id") Long id, @Param("taskStatus") Integer taskStatus, @Param("remarks") String remarks, @Param("uploadTime") Date uploadTime);

    void syncBytedance(@Param("signature") String signature);

    void syncKuaishou(@Param("signature") String signature);

    String getKuaiShouTokenByAccountId(@Param("accountId") Long accountId);

    void replaceBatch(@Param("addList") List<MaterialUploadTask> tasksList);

    Long getProjectIdByAccoubt(@Param("accountId") Long accountId);

    void addLong(@Param("signature") String signature, @Param("projectId") Long projectId, @Param("videoId") String videoId, @Param("accountId") Long accountId);
}
