<?php

namespace App\Http\Controllers\Channel\Ali;

use App\Http\Controllers\Channel\BaseController;
use App\Modules\Ali\Services\AliSendOrderService;
use Hashids;
use Illuminate\Http\Request;
use SimpleSoftwareIO\QrCode\Facades\QrCode;
use App\Http\Controllers\Channel\Ali\Transformers\AliSendOrderTransformer;

class AliSendOrderStatController extends BaseController
{
    /**
     * @apiDefine sendOrder 派单
     */

    /**
     * @apiVersion 1.0.0
     * @apiDescription 数据统计
     * @api {POST} getSendOrderStat 得到小程序派单数据统计
     * @apiGroup sendOrder
     * @apiName getSendOrderStat
     * @apiSuccess {String}  todayChargeAmount 今日充值
     * @apiSuccess {String}  todayAddUserNum 今日新增用户
     * @apiSuccess {String}  totalChargeAmount 累计充值
     * @apiSuccess {String}  totalUserNum 累计用户
     * @apiSuccessExample {json} Success-Response:
     *     {
     *         "code": 0,
     *         "msg": "",
     *         "data":{}
     *     }
     */
    function getSendOrderStat(Request $request)
    {
        $distribution_channel_id = $this->getChannelId();
        $sendOrderStat = AliSendOrderService::getSendOrderStat($distribution_channel_id);

        return response()->success($sendOrderStat);
    }

}
