<?php

Route::group(['domain'=>env('MANAGE_DOMAIN'),'namespace' => 'App\Http\Controllers\Manage\Trade', 'prefix' => 'api/trade','middleware'=>'ManageApiAuth'], function () {

    //获取订单列表
    Route::get('orders', 'OrdersController@getOrders');

    Route::get('orderStats', 'OrderStatsController@index');
    Route::get('exportOrderStats', 'OrderStatsController@export');



    Route::get('orderDayStats', 'OrderDayStatsController@index');
    Route::get('getAllGroupbyMonth', 'OrderDayStatsController@getAllGroupbyMonth');
    Route::get('getAllGroupbyMonthChannel', 'OrderDayStatsController@getAllGroupbyMonthChannel');
    Route::get('exportAllGroupbyMonthChannel', 'OrderDayStatsController@exportAllGroupbyMonthChannel');
    Route::get('exportOrderDayStats', 'OrderDayStatsController@export');
    Route::get('getStatByChannel', 'OrderDayStatsController@getStatByChannel');
    Route::get('exportStatByChannel', 'OrderDayStatsController@exportStatByChannel');

    //按公司统计数据
    Route::get('getStatByCompany', 'OrderDayStatsController@getStatByCompany');
    Route::get('exportStatByCompany', 'OrderDayStatsController@exportStatByCompany');


    Route::get('getOutPayData', 'OrderDayStatsController@getOutPayData');
    Route::get('getOutPayDataExport', 'OrderDayStatsController@getOutPayDataExport');


    Route::get('today', 'OrdersController@today');
    Route::get('todayChannelList', 'OrdersController@todayChannelList');

    //根据用户id获取书本的订购信息
    Route::get('getBookConsumerInfoByUserId', 'ConsumerController@getBookConsumerInfoByUserId');

    //根据用户id获取章节的订购信息
    Route::get('getChapterConsumerInfoByUserId', 'ConsumerController@getChapterConsumerInfoByUserId');


    //导出订单列表
    Route::get('exportOrders', 'OrdersController@exportOrders');

    //代付统计
    Route::get('getSubstituteOrderInfos', 'SubstituteOrdersController@getSubstituteOrderInfos');
    //代付统计信息导出
    Route::get('exportSubstituteOrderInfos', 'SubstituteOrdersController@exportSubstituteOrderInfos');




});

//协同查询
Route::group(['domain'=>env('MANAGE_DOMAIN'),'namespace' => 'App\Http\Controllers\Manage\Trade', 'prefix' => 'api/trade'], function () {

    Route::get('internalSearch', 'OrdersController@internalSearch');

});