package org.jeecg.modules.ctop.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.ctop.entity.MaterialUploadTask;

import java.util.List;

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

    Integer getCountByUserIdAndMd5(@Param("userId") Long userId,@Param("signature") String signature);

    JSONObject getMaterialNameBySignature(@Param("id") String id);

    Integer getCountByAccountIdAndMd5(@Param("accountId") Long accountId, @Param("signature") String signature);

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

    List<JSONObject> uploadDetail(@Param("signature") String signature);

    Integer getCount(String signature);

    Integer getCountByaccountIdAndMd5(@Param("userId") Long userId, @Param("accountId") Long accountId,@Param("signature") String signature);

    JSONObject getVideoId(@Param("projectId") Long projectId,@Param("signature") String signature);

    Long getProjectIdByAccountId(@Param("accountId") Long accountId);
}
