import request from '@/utils/request'
import qs from 'qs'

/**
 * 押金管理接口
 */

// 押金概括
const depositSum = function(params) {
    return request({
        url: '/capital/depositSum.do',
        method: 'get',
        params
    })
}

// 近30日押金趋势列表
const depositChartList = function(params) {
    return request({
        url: '/capital/getDepositTrendList.do',
        method: 'get',
        params
    })
}

// 每日押金增长明细
const depositTrendList = function(params) {
    return request({
        url: '/capital/depositTrendDetailList.do',
        method: 'get',
        params
    })
}
// 押金明细分页查询
const depositDetailPage = function(params) {
    return request({
        url: '/capital/findDepositDetailPage.do',
        method: 'get',
        params
    })
}
// 押金审核
const depositAudit = function(params) {
    return request({
        url: '/capital/updateOrAudit.do',
        method: 'get',
        params
    })
}
// 审核结果
const depositResult = function(params) {
    return request({
        url: '/capital/findOrderById.do',
        method: 'get',
        params
    })
}

/**
 * 收益管理接口
 */

// 收益概括和收益
const revenueSum = function(params) {
    return request({
        url: '/capital/revenueSum.do',
        method: 'get',
        params
    })
}
// 近30日收益趋势
const RevenueChartList = function(params) {
    return request({
        url: '/capital/getRevenueAndProfitTrendList.do',
        method: 'get',
        params
    })
}
// 每日收益增长明细
const getProfitDetailList = function(params) {
    return request({
        url: '/capital/getProfitDetailList.do',
        method: 'get',
        params
    })
}
// 骑行收益明细分页查询
const findProfitDetailPage = function(params) {
    return request({
        url: '/capital/findProfitDetailPage.do',
        method: 'get',
        params
    })
}
// 总收益分页查询
const findSumProfitDetailPage = function(params) {
    return request({
        url: '/capital/findSumProfitDetailPage.do',
        method: 'get',
        params
    })
}

export default {
    depositSum,
    depositChartList,
    depositTrendList,
    depositDetailPage,
    depositAudit,
    depositResult,

    revenueSum,
    RevenueChartList,
    getProfitDetailList,
    findProfitDetailPage,
    findSumProfitDetailPage
}
