48 lines
878 B
PHP
48 lines
878 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: kongqi
|
|
* Date: 2019/1/6
|
|
* Time: 21:01
|
|
*/
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Models\Merchant;
|
|
|
|
class MerchantStatisServices
|
|
{
|
|
public static $where;
|
|
public $model;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->model = new Merchant();
|
|
|
|
}
|
|
|
|
/**
|
|
* 订单数量
|
|
* @param $month
|
|
* @return mixed
|
|
*/
|
|
public function getNumber(array $data)
|
|
{
|
|
//dump($data);
|
|
|
|
$search = new SearchServices($this->model, $data);
|
|
$search->unsetAllWhere();
|
|
//dump($search->echoWhere());
|
|
return ($search->totalNumber('id'));
|
|
}
|
|
|
|
public function getSum($data, $field)
|
|
{
|
|
$search = new SearchServices($this->model, $data);
|
|
$search->unsetAllWhere();
|
|
//dump($search->echoWhere());
|
|
return money_str($search->totalSum($field));
|
|
}
|
|
|
|
|
|
} |