<?php
/**
 * Created by PhpStorm.
 * User: tandunzhao
 * Date: 2017/12/5
 * Time: 下午4:41
 */

namespace App\Modules\Finance\Services;


use App\Modules\Finance\Models\PaymentStatistic;

class PaymentStatisticService
{

    /**
     * 保存报表
     * @param array $data
     * @return mixed
     */
    public static function addPaymentStatistics($data = []) {
        $result = PaymentStatistic::create($data);
        return $result;
    }

    /**
     * 获取每日统计报表
     * @param string $start_time
     * @param string $end_time
     * @param bool $isAll
     * @return mixed
     */
    public static function getGroupByDayDataStatistic($start_time = '', $end_time = '', $isAll = false) {
        return PaymentStatistic::getGroupByDayDataStatistic($start_time, $end_time, $isAll);
    }
}