package ctop.bytedance.ad.advertise.service;

import com.baomidou.mybatisplus.extension.service.IService;
import ctop.bytedance.ad.advertise.entity.ByteDanceAdvertisePlan;
import ctop.bytedance.ad.common.entity.CtopOauthToken;
import ctop.bytedance.ad.report.entity.BytedancePlanHourlyReport;

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

/**
 * 今日头条广告计划信息
 * @author jeecg-boot
 * 2019-07-22
 * @version V1.0
 */
public interface IByteDanceAdvertisePlanService extends IService<ByteDanceAdvertisePlan> {

    //获取广告计划  https://ad.oceanengine.com/open_api/2/ad/get/
    Map<String, Object> getAdvertiserPlan(CtopOauthToken token, String ids, String date, String updateDate);


    //修改广告计划  https://ad.oceanengine.com/open_api/2/ad/update/
    Map<String, Object> updateAdvertiserPlan(CtopOauthToken token,String landingType, ByteDanceAdvertisePlan byteDanceAdvertisePlan);



    //获取计划审核建议  https://ad.oceanengine.com/open_api/2/ad/reject_reason/
    Map<String, Object> getAdvertiserPlanRejectReason(CtopOauthToken token, Long advertiserId, List<Long> adIds);

    //查询需要预警的广告计划名称
    List<String> selectWarningGroup(Long accountId, BigDecimal maxBid);

    //查询需要预警的深度转化出价
    List<String> selectWarningCpaBid(Long accountId, BigDecimal maxCapBid);

    List<ByteDanceAdvertisePlan> getAllPlans(Long accountId,String createDate);

    List<ByteDanceAdvertisePlan> getAllPlansByAccountId(Long accountId,String adModifyTime);

    int queryToDayBuiltCount(Long accountId);

    Integer updatePlanOrPackage (ByteDanceAdvertisePlan byteDanceAdvertisePlan);
}
