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

export interface PitcherTotalProps extends Paging, SortProps {
    amountBeginDate?: string, // 充值开始时间
    amountEndDate?: string,
    beginDate?: string,    // 消耗开始时间
    endDate?: string,
    pitcherId?: number,   // 投手ID
}
/**
 * 投手总数居
 * @param data 
 * @returns 
 */
export async function getPitcherTotalListApi(data: PitcherTotalProps) {
    return request(wapi + `/pitcherData/pitcher/total`, {
        method: 'POST',
        data
    });
}

/**
 * 投手总数居总计
 * @param data 
 * @returns 
 */
export async function getPitcherTotalSumApi(data: PitcherTotalProps) {
    return request(wapi + `/pitcherData/pitcher/total/sum`, {
        method: 'POST',
        data
    });
}

export interface PitcherDayProps extends Paging, SortProps {
    beginDate?: string,    // 消耗开始时间
    endDate?: string,
    pitcherId?: number,   // 投手ID
}
/**
 * 投手每日数据数居
 * @param data 
 * @returns 
 */
export async function getPitcherDayListApi(data: PitcherDayProps) {
    return request(wapi + `/pitcherData/pitcher/day`, {
        method: 'POST',
        data
    });
}

/**
 * 投手每日数居总计
 * @param data 
 * @returns 
 */
export async function getPitcherDaySumApi(data: PitcherTotalProps) {
    return request(wapi + `/pitcherData/pitcher/day/total`, {
        method: 'POST',
        data
    });
}


export interface PitcherGameTotalProps extends Paging, SortProps {
    amountBeginDate?: string, // 充值开始时间
    amountEndDate?: string,
    beginDate?: string,    // 消耗开始时间
    endDate?: string,
    pitcherId?: number,   // 投手ID
    gameCp?: string,
    gameId?: number,
    gameType?: number
}
/**
 * 投手游戏总数居
 * @param data 
 * @returns 
 */
export async function getPitcherGameTotalListApi(data: PitcherGameTotalProps) {
    return request(wapi + `/pitcherData/pitcherGame/total`, {
        method: 'POST',
        data
    });
}

/**
 * 投手游戏总数居总计
 * @param data 
 * @returns 
 */
export async function getPitcherGameTotalSumApi(data: PitcherGameTotalProps) {
    return request(wapi + `/pitcherData/pitcherGame/total/sum`, {
        method: 'POST',
        data
    });
}



export interface PitcherGameDayProps extends Paging, SortProps {
    beginDate?: string,    // 消耗开始时间
    endDate?: string,
    pitcherId?: number,   // 投手ID
    gameCp?: string,
    gameId?: number,
    gameType?: number
}
/**
 * 投手每日数据数居
 * @param data 
 * @returns 
 */
export async function getPitcherGameDayListApi(data: PitcherGameDayProps) {
    return request(wapi + `/pitcherData/pitcherGame/day`, {
        method: 'POST',
        data
    });
}

/**
 * 投手每日数居总计
 * @param data 
 * @returns 
 */
export async function getPitcherGameDaySumApi(data: PitcherGameDayProps) {
    return request(wapi + `/pitcherData/pitcherGame/day/total`, {
        method: 'POST',
        data
    });
}