mirror of
https://github.com/v2board/v2board.git
synced 2024-11-14 07:29:13 +08:00
update: statistics
This commit is contained in:
parent
faeaa02a84
commit
5766ec1951
@ -50,8 +50,8 @@ class V2BoardStatistics extends Command
|
|||||||
{
|
{
|
||||||
$endAt = strtotime(date('Y-m-d'));
|
$endAt = strtotime(date('Y-m-d'));
|
||||||
$startAt = strtotime('-1 day', $endAt);
|
$startAt = strtotime('-1 day', $endAt);
|
||||||
$builder = Order::where('updated_at', '>=', $startAt)
|
$builder = Order::where('created_at', '>=', $startAt)
|
||||||
->where('updated_at', '<', $endAt)
|
->where('created_at', '<', $endAt)
|
||||||
->whereIn('status', [3, 4]);
|
->whereIn('status', [3, 4]);
|
||||||
$orderCount = $builder->count();
|
$orderCount = $builder->count();
|
||||||
$orderAmount = $builder->sum('total_amount');
|
$orderAmount = $builder->sum('total_amount');
|
||||||
|
Loading…
Reference in New Issue
Block a user