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

export interface AllSurveyTotalDataProps {
    accountId?: number,  // 推广账号
    agentId?: number,    // 推广渠道
    beginDate?: string,  // 开始时间
    endDate?: string,    // 结束时间
    gameId?: number,     // 游戏ID
    pitcherId?: number   // 投手
    sourceSystem?: string
}
/**
 * 获取整体概况数据
 * @param data 
 * @returns 
 */
export async function getAllSurveyTotalDataApi(data: AllSurveyTotalDataProps) {
    return request(wapi + `/allSurvey/totalData`, {
        method: 'POST',
        data
    });
}
/**
 * 获取折线图数据
 * @param data 
 * @returns 
 */
export async function getAllSurveyLineDataApi(data: AllSurveyTotalDataProps) {
    return request(wapi + `/allSurvey/lineData`, {
        method: 'POST',
        data
    });
}