<?php

use think\facade\Route;

/**
 * 报表 相关路由
 */
Route::group('report', function () {
    Route::post('hand_create', 'Report/createYesterdayReport')->name('createYesterdayReport');//手动生成昨日报表
    Route::get('system_list', 'Report/systemReportList')->name('systemReportList');//系统报表
    Route::get('merchant_list', 'Report/merchantReportList')->name('merchantReportList');//商户报表
    Route::get('rank/:type/:sort', 'Report/merchantRank')->name('merchantRank');//商户排行
    Route::get('header/:mer_id', 'Report/homeStatics')->name('homeStatics');//首页统计数据
    Route::get('order/:mer_id', 'Report/orderChart')->name('orderChant');//首页订单图表
    Route::get('user/:mer_id', 'Report/userChart')->name('userChant');//首页用户图表
    Route::get('rank/:mer_id', 'Report/purchaseRanking')->name('purchaseRanking');//交易额排行
})->middleware([
    \app\http\middleware\AllowOriginMiddleware::class,
    \app\badminapi\middleware\BadminAuthTokenMiddleware::class,
    \app\badminapi\middleware\BadminCkeckRole::class
]);