package ctop.bytedance.ad.advertise.service;

import com.baomidou.mybatisplus.extension.service.IService;
import ctop.bytedance.ad.advertise.vo.AdConvertQueryVo;
import ctop.bytedance.ad.advertise.vo.AdGroupSearchVo;
import ctop.bytedance.ad.advertise.vo.PlanSearchVo;
import ctop.bytedance.ad.common.entity.CtopOauthToken;
import org.jeecg.common.api.vo.Result;
import ctop.bytedance.ad.advertise.entity.AiBytedanceAdvertiserStrategy;
import ctop.bytedance.ad.advertise.entity.UpdAdStaOrCpaOrBudget;

import java.util.List;

/**
 * 头条智能投放账户配置信息表
 * @author jeecg-boot
 * 2021-04-20
 * @version V1.0
 */
public interface IAiBytedanceAdvertiserStrategyService extends IService<AiBytedanceAdvertiserStrategy> {
    /**
     * 修改 广告 组-计划-创意
     * @param strategy
     * @param groupModifyTime 广告组 修改时间戳
     * @param planModifyTime  计划 修改时间戳
     * @return
     */
    Result updateADCreative(AiBytedanceAdvertiserStrategy strategy,String groupModifyTime,String planModifyTime);


    Long createCreative(CtopOauthToken token, AiBytedanceAdvertiserStrategy strategy, Integer createType, Long videoCnt, String openUrl);

    /**
     * 头条 - 配置信息 修改 状态
     * @param
     * @return
     */
    Result updStaById(String id,String state,String accountId,String creativeImageMode);

    /**
     * 头条 - 配置信息 修改 出价; 预算;
     * @param updAdStaOrCpaOrBudget
     * @return
     */
    Result updStaOrCpaOrBudgetById(UpdAdStaOrCpaOrBudget updAdStaOrCpaOrBudget);

    /**
     * 获取行业列表
     * @param type
     * @return
     */
    Result getIndustryList(String accountId,String type) throws Exception;

    /**
     *  获取广告组
     * @param accountId 广告主id
     * @param adGroupSearchVoList
     * @param pageNo
     * @param pageSize
     * @return
     */
    Result getCampaignGroup(String accountId, List<AdGroupSearchVo> adGroupSearchVoList, Integer pageNo, Integer pageSize);

    /**
     *  获取广告组计划
     * @param accountId 广告主id
     * @param planSearchVoList
     * @param pageNo
     * @param pageSize
     * @return
     */
    Result getCampaignPlan(String accountId, PlanSearchVo planSearchVoList, Integer pageNo, Integer pageSize);

    /**
     * @description: 获取创意详细信息
     * @param accountId 广告主id
     * @param adId 计划id
     * @return: org.jeecg.common.api.vo.Result
     */
    Result creativeReadInfo(String accountId, String adId);

    /**
     * 查询广告计划可用转化目标
     * @param adConvertQueryVo
     * @return
     */
    Result getToolConvert(AdConvertQueryVo adConvertQueryVo);


    /**
     *  添加配置信息
     * @param aiBytedanceAdvertiserStrategy
     * @return
     */
    Result<AiBytedanceAdvertiserStrategy> addBytedanceStrategy(AiBytedanceAdvertiserStrategy aiBytedanceAdvertiserStrategy);

    List<AiBytedanceAdvertiserStrategy> getByAccountId(Long accountId,Integer status);

    void customCreativeSupplement( AiBytedanceAdvertiserStrategy strategy, Integer hour,String openUrl);

    Result getAdActionText(String accountId,String landingType,String advancedCreativeType) throws Exception;

    Result getAdAudiencePackage(String accountId, String landingType, String deliveryRange);

    Result getDMPCustomAudience(String accountId);

    Result createAudiencePackage(String accountId);

    /**
     * 获取橙子建站站点列表
     * @param accountId
     * @return
     */
    Result getChengZiSite(String accountId);


    /**
     * 查询 组名称 计划名称
     */
    Result getStrategyInfoByName(AiBytedanceAdvertiserStrategy aiBytedanceAdvertiserStrategy);


}
