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

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

import java.util.List;

/**
 * @Description: 快手-获取广告计划信息
 * @Author: jeecg-boot
 * @Date: 2019-07-23
 * @Version: V1.0
 */
public interface KuaiShouCampaignMapper extends BaseMapper<KuaiShouCampaign> {

    void replaceBatch(@Param(value = "campaigns") List<KuaiShouCampaign> campaigns);

    List<Long> queryIdsByPutStatus(Long accountId, String putStatus);

    List<Long> queryCampaignIdByAccountId(Long accountId);

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

    Long getCampaignIdByAccountAndName(@Param("accountId") Long accountId, @Param("name") String replaceString);

    Long getCampaignIdByAccountAndNameAndDate(@Param("accountId") Long accountId, @Param("name") String replaceString, @Param("nowDate") String nowDate);

    List<JSONObject> getCampaignIdsByParameters(@Param("accountId") Long accountId, @Param("typeName") String typeName, @Param("nowDate") String nowDate);
}
