import { request } from 'umi';
import { api } from '../api';
import { Paging, SortProps } from './rankingList';
let wapi = api + '/gameData'

export interface PromotionDataDay extends Paging, SortProps {
    accountId?: number,   // 推广账号ID
    accountName?: string, // 推广账号名称
    accountType?: string, // 投放媒体
    agentId?: number,     // 渠道ID
    agentKey?: string,    // 渠道标识
    agentName?: string,   // 渠道名称
    classify?: number,    // 游戏应用类型
    costBeginDate?: string, // 消耗开始时间
    costEndDate?: string,   // 消耗结束时间
    cpName?: string,      // CP名称
    gameId?: number,      // 游戏ID
    gameName?: string,    // 游戏名称
    pitcherId?: number,   // 投手ID
    pitcherName?: string, // 投手名称
    projectId?: number,   // 计划ID
    projectName?: string, // 计划名称
    promotionId?: number, // 广告ID
    promotionName?: string, // 广告名称
    sourceSystem?: string,  // SDK来源
    status?: string     //广告状态
}
/**
 * 头条广告监控数据
 * @param data 
 * @returns 
 */
export async function getPromotionDataDatListApi(data: PromotionDataDay) {
    return request(wapi + `/promotionData/day`, {
        method: 'POST',
        data
    });
}

/**
 * 头条广告监控数据总计
 * @param data 
 * @returns 
 */
export async function getPromotionDataDatTotalApi(data: PromotionDataDay) {
    return request(wapi + `/promotionData/total`, {
        method: 'POST',
        data
    });
}

/**
 * 头条广告每日监控
 * @param data 
 * @returns 
 */
export async function getPromotionDataDayListApi(data: PromotionDataDay) {
    return request(wapi + `/promotionData/day/list`, {
        method: 'POST',
        data
    });
}

/**
 * 头条广告每日监控总计
 * @param data 
 * @returns 
 */
export async function getPromotionDataDayTotalApi(data: PromotionDataDay) {
    return request(wapi + `/promotionData/day/listTotal`, {
        method: 'POST',
        data
    });
}


/**
 * 腾讯广告监控数据
 * @param data 
 * @returns 
 */
export async function getPromotionDataTencentListApi(data: PromotionDataDay) {
    return request(wapi + `/promotionData/tencent/day`, {
        method: 'POST',
        data
    });
}


/**
 * 腾讯广告监控数据总计
 * @param data 
 * @returns 
 */
export async function getPromotionDataTencentTotalApi(data: PromotionDataDay) {
    return request(wapi + `/promotionData/tencent/total`, {
        method: 'POST',
        data
    });
}

/**
 * 腾讯广告每日监控
 * @param data 
 * @returns 
 */
export async function getPromotionDataTencentDayListApi(data: PromotionDataDay) {
    return request(wapi + `/promotionData/tencent/day/list`, {
        method: 'POST',
        data
    });
}
/**
 * 腾讯广告每日总计监控
 * @param data 
 * @returns 
 */
export async function getPromotionDataTencentDayTotalApi(data: PromotionDataDay) {
    return request(wapi + `/promotionData/tencent/day/listTotal`, {
        method: 'POST',
        data
    });
}