package com.xxl.job.executor.batch.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xxl.job.executor.common.entity.CtopOauthToken;
import com.xxl.job.executor.material.entity.KuaishouResult;
import com.xxl.job.executor.material.entity.KuaishouResultToken;
import com.xxl.job.executor.report.entity.*;

import java.util.Date;
import java.util.Map;

/**
 * @author yumeng
 * 2019年11月12日11:08:52
 */
public interface IKuaishouInterfaceService {

    /**
     * 计划日报
     *
     * @param accessToken
     * @param advertiserId
     * @param startDate
     * @param endDate
     * @param pageSize
     * @param pageNum
     * @return
     */
    KuaishouResult<KuaishouReportDailyCampaign> getCampaignDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);

    /**
     * 计划时报
     *
     * @param accessToken
     * @param advertiserId
     * @param startDate
     * @param endDate
     * @param pageSize
     * @param pageNum
     * @return
     */
    KuaishouResult<KuaishouReportHourlyCampaign> getCampaignHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);

    /**
     * 组日报
     *
     * @param accessToken
     * @param advertiserId
     * @param startDate
     * @param endDate
     * @param pageSize
     * @param pageNum
     * @return
     */
    KuaishouResult<KuaishouReportDailyGroup> getGroupDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);

    /**
     * 组时报
     *
     * @param accessToken
     * @param advertiserId
     * @param startDate
     * @param endDate
     * @param pageSize
     * @param pageNum
     * @return
     */
    KuaishouResult<KuaishouReportHourlyGroup> getGroupHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);

    /**
     * 创意日报 暂停使用
     *
     * @param accessToken
     * @param advertiserId
     * @param startDate
     * @param endDate
     * @param pageSize
     * @param pageNum
     * @return
     */
    KuaishouResult<KuaishouReportDailyCreative> getCreativeDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);

    /**
     * 创意时报 暂停使用
     *
     * @param accessToken
     * @param advertiserId
     * @param startDate
     * @param endDate
     * @param pageSize
     * @param pageNum
     * @return
     */
    KuaishouResult<KuaishouReportHourlyCreative> getCreativeHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);

    /**
     * 获取广告计划信息  单条
     *
     * @param accessToken
     * @param advertiserId
     */
    void getCampaign(String accessToken, Long advertiserId, Long campaignId);


    /**
     * 获取创意列表
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getCreativeList(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取视频信息
     *
     * @param accessToken
     * @param advertiserId
     * @param photoId
     */
    void getVideoInfo(String accessToken, Long advertiserId, String photoId);


    /**
     * 获取token
     *
     * @param authCode
     * @return
     */
    KuaishouResultToken getAccessToken(String authCode, Integer agentType);

    /**
     * 取可选的深度转化类型
     *
     * @param advertiserId
     * @param accessToken
     * @return
     */
    JSONObject getDeepConversionInfosV2(Long advertiserId, String accessToken);

    /**
     * 根据创意id 获取创意信息
     *
     * @param accessToken
     * @param advertiserId
     * @param creativeId
     */
    void getCreativeByCreativeId(String accessToken, Long advertiserId, Long creativeId);

    /**
     * 获取视频
     *
     * @param advertiserId
     * @param accessToken
     * @param photoId
     */
    void videoGet(Long advertiserId, String accessToken, String photoId, String signature);

    /**
     * 获取图片信息
     *
     * @param advertiserId
     * @param accessToken
     * @param imageToken
     */
    void imageGet(Long advertiserId, String accessToken, String imageToken);

    /**
     * 文件上传 发送请求
     *
     * @param url
     * @param paramMap
     * @param headerMap
     * @param filePath
     */
    String exceptInfoForRestTemplate(String url, Map<String, Object> paramMap, Map<String, String> headerMap, String filePath);

    /**
     * 快手 广告主信息
     *
     * @param accountId
     * @param accessToken
     * @return
     */
    Map<String, Object> advertiserInfo(Long accountId, String accessToken);

    /**
     * 获取视频列表
     *
     * @param token
     * @param
     */
    void getVideoList(CtopOauthToken token, String startDate, String endDate);

    /**
     * 获取广告主分天报表
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getAdvertiserReportDaily(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取计划分天报表
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getAdvertiserCampaignReportDaily(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取广告计划分天报表 暂停使用
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getAdvertiserGroupReportDaily(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取创意分天报表 暂停使用
     *
     * @param token
     * @param startDate
     * @param endDate
     * @param campaignIds
     */
    void getAdvertiserCreativeReportDaily(CtopOauthToken token, Date startDate, Date endDate, JSONArray campaignIds, JSONArray creativeIds);

    /**
     * 获取广告主时报
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getAdvertiserReportHourly(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取计划时报
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getAdvertiserCampaignReportHourly(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取组时报
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getAdvertiserGroupReportHourly(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取创意时报 暂停使用
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getAdvertiserCreativeReportHourly(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取计划列表
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getCampaignList(CtopOauthToken token, Date startDate, Date endDate);

    /**
     * 获取组列表
     *
     * @param token
     * @param startDate
     * @param endDate
     */
    void getGroupList(CtopOauthToken token, Date startDate, Date endDate);


    /**
     * 获取快手图片列表
     *
     * @param token
     */
    void getImageList(CtopOauthToken token, String statDate);


    /**
     * 获取账户余额
     *
     * @param oauthToken
     * @return
     */
    JSONObject fundGet(CtopOauthToken oauthToken);


    /**
     * 获取账户流水数据
     *
     * @param token
     */
    void getDailyFlows(CtopOauthToken token);

    /**
     * 获取素造素材列表
     *
     * @param token
     * @param accountId
     * @param page
     */
    void getSuZaoList(String token, Long accountId, int page, String startDate, String endDate);

    /**
     * 异步获取创意信息
     *
     * @param accountId
     * @param accessToken
     * @param campaignId
     */

    void getAsyncCreativeList(Long accountId, String accessToken, Long campaignId);

    void getCreativeByCreativeIds(String accessToken, Long advertiserId, JSONArray creativeIds);

    void getOperationRecord(Long advertiserId, String accessToken, Integer operationTarget, String startDate, String endDate);
}



