package cn.com.ctop.common.module.service;

import cn.com.ctop.common.module.entity.MaterialInfo;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

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

/**
 * 素材信息
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2019-10-11
 */
public interface IMaterialInfoService extends IService<MaterialInfo> {

    /**
     * 快手供应商打水印
     *
     * @param videoSignature
     * @param videoUrl
     * @param templateId
     */
    String watermarkVideoBySupplierCode(String videoSignature, String videoUrl, Long templateId);

    MaterialInfo getMaterialInfoByCodeAndProductId(String code, Long productId);

    MaterialInfo getMaterialInfoByCode(String code);

    Map<String, Object> checkMaterialInfo(String code, Long projectId);

    Map<String, Object> insert(JSONObject jsonObject);

    JSONObject getDetail(String materialId);

    JSONObject report(String userId);

    void watermarkVideo(String materialId, Long videoWatermarkTemplateId, String userId);

    void getFile(MaterialInfo materialInfo);

    void setExcellent(String id, Integer excellent);

    Integer getKuaishouUpVideoCount(@Param("code") String code);

    Integer getToutiaoUpVideoCount(@Param("code") String code);

    /**
     * 素材库 关联上传素材
     *
     * @param json
     * @return
     */
    Map<String, Object> correlationUpload(JSONObject json);

    /**
     * 下单制关联素材库
     */
    String platformUploadVideo(JSONObject json);


    /**
     * 关联上传封面
     *
     * @param json
     * @return
     */
    Map<String, Object> insertImage(JSONObject json);


    List<MaterialInfo> effiMaterialInfo();

    List<String> getEffiCode();

    List<MaterialInfo> getListByDate(String startDate, String endDate);


    JSONArray getIdListByProject(Long projectId);

    Map<String, Object> getListByParams(String tagCode, String type, Integer status, String materialName, List<Long> projectIds, String code, String startDate, String endDate, String userId, String clipId, String shotId, String planId, String leaderName,Integer offlineFlag, Integer pageNo, Integer pageSize,Integer syncKuaishou,Integer syncBytedance,Integer materialInnovate);

    void correlationUploadV2(JSONObject json);

    JSONArray checkArrayCode(JSONArray array);

    List<MaterialInfo> getListByProduct(Long productId);

    void materialSync(Long projectId, JSONArray toProjectIds);

    List<MaterialInfo> getExcelListByParams(String tagCode, String type, Integer status, String materialName, List<Long> projectIds, String code, String startDate, String endDate, String userId, String clipId, String shotId, String planId, String leaderName, Integer offlineFlag, Integer syncKuaishou, Integer syncBytedance, Integer materialInnovate);

    List<JSONObject> excelByIds(JSONArray ids);
}
