package ctop.bytedance.ad.advertise.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.lettuce.core.dynamic.annotation.Param;
import ctop.bytedance.ad.advertise.entity.ByteDanceAdvertisePlan;
import ctop.bytedance.ad.report.entity.BytedancePlanHourlyReport;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 今日头条广告计划信息
 * @Author: jeecg-boot
 * @Date: 2019-07-22
 * @Version: V1.0
 */
public interface ByteDanceAdvertisePlanMapper extends BaseMapper<ByteDanceAdvertisePlan> {

    List<String> selectWarningGroup(@Param("accountId") Long accountId, @Param("maxBid") BigDecimal maxBid);

    List<String> selectWarningCpaBid(@Param("accountId") Long accountId, @Param("maxCpaBid") BigDecimal maxCpaBid);

    int queryTodayBuiltCount(Long accountId, String date);

    /**
     * 更新广告计划 操作状态 或 定向包id
     * @param byteDanceAdvertisePlan
     * @return
     */
    Integer updateAdvertisePlan (ByteDanceAdvertisePlan byteDanceAdvertisePlan);
}
