import { AxiosPromise } from "axios";
import request from "../request";
import { order } from "../types/order";
const order = {
    //按年查询每月收入
    studentOrderInfoSelectMonthIncone(params: {
        year: number|string
    }):AxiosPromise<any> {
        return request({
            url: "student/order/info/selectMonthIncone",
            method: "GET",
            params
        })

    },
    //查询订单列表
    studentOrderInfoList(params: {
        endTime?: string,
        goodsName?: string,
        outRefundNo?: string,
        outTradeNo?: string,
        pageNum?: number,
        pageSize?: number,
        referralUserId?: number,
        startTime?: string,
        total?: number,
        tradeType?: string

    }): AxiosPromise<order.studentOrderInfoList> {
        return request({
            url: 'student/order/info/list',
            params: params,
            method: 'GET'
        })

    },
    //今日预估收益
    studentOrderInfoTodayTotal(params: {
        endTime?: string,
        goodsName?: string,
        outRefundNo?: string,
        outTradeNo?: string,
        pageNum?: number,
        pageSize?: number,
        referralUserId?: number,
        startTime?: string,
        total?: number,
        tradeType?: string

    }): AxiosPromise<order.commonResponse> {
        return request({
            url: 'student/order/info/todayTotal',
            params: params,
            method: 'GET'
        })

    },
    //总收益
    studentOrderInfoTotal(params: {
        endTime?: string,
        goodsName?: string,
        outRefundNo?: string,
        outTradeNo?: string,
        pageNum?: number,
        pageSize?: number,
        referralUserId?: number,
        startTime?: string,
        total?: number,
        tradeType?: string

    }): AxiosPromise<order.commonResponse> {
        return request({
            url: 'student/order/info/total',
            params: params,
            method: 'GET'
        })

    },
    //昨日收益
    studentOrderInfoYesterdayTotal(params: {
        endTime?: string,
        goodsName?: string,
        outRefundNo?: string,
        outTradeNo?: string,
        pageNum?: number,
        pageSize?: number,
        referralUserId?: number,
        startTime?: string,
        total?: number,
        tradeType?: string

    }): AxiosPromise<order.commonResponse> {
        return request({
            url: 'student/order/info/yesterdayTotal',
            params: params,
            method: 'GET'
        })

    }

}



export default order



