package cn.com.ctop.toutiao.modules.material.service;

import cn.com.ctop.common.module.entity.CtopOauthToken;
import cn.com.ctop.toutiao.modules.material.entity.ByteDanceAdvertisePlan;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;

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

/**
 * @Description: 今日头条广告计划信息
 * @Author: jeecg-boot
 * @Date: 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/create/
    Map<String, Object> createAdvertiserPlan(CtopOauthToken token, String landingType, ByteDanceAdvertisePlan byteDanceAdvertisePlan);

    //修改广告计划  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/update/status/
    Map<String, Object> updateAdvertiserPlanStatus(CtopOauthToken token, JSONArray adIds, String optStatus);

    //更新计划预算  https://ad.oceanengine.com/open_api/2/ad/update/budget/
    Map<String, Object> updateAdvertiserPlanBudget(CtopOauthToken token, JSONArray adIds, JSONArray budgets);

    //更新计划出价  https://ad.oceanengine.com/open_api/2/ad/update/bid/
    Map<String, Object> updateAdvertiserPlanBid(CtopOauthToken token, JSONArray adIds,JSONArray bids);

    //获取计划审核建议  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);
}
