From 1d9ba24514c3190f6dc942be499a0d9e9457b45d Mon Sep 17 00:00:00 2001 From: Jing Li Date: Mon, 23 Oct 2023 20:26:06 +0800 Subject: [PATCH 1/2] Update --- app/Admin/Metrics/StatisticsTotal.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Admin/Metrics/StatisticsTotal.php b/app/Admin/Metrics/StatisticsTotal.php index cc537eff..d7ad622e 100644 --- a/app/Admin/Metrics/StatisticsTotal.php +++ b/app/Admin/Metrics/StatisticsTotal.php @@ -60,9 +60,9 @@ class StatisticsTotal extends RadialBar $order = Order::whereBetween('created_at', [$start_time, $end_time])->whereNotIn('status', [Order::STATUS_PENDING, Order::STATUS_CANCELLED])->sum('total_amount'); // 卡片内容 $this->withContent([ - 'total_points'=> UserInfo::sum('points'), - 'total_wallet'=> bcdiv(Wallet::sum('balance'), 100, 2), - 'total_balance'=> bcdiv(Balance::sum('balance'), 100, 2), + 'total_points'=> bcdiv(UserInfo::sum('points'), 100, 2), + // 'total_wallet'=> bcdiv(Wallet::sum('balance'), 100, 2), + // 'total_balance'=> bcdiv(Balance::sum('balance'), 100, 2), 'order_money' => bcdiv($order, 100, 2) ]); } From ae69749f9391d10501db32a1663dcfdaba2eecec Mon Sep 17 00:00:00 2001 From: Jing Li Date: Mon, 23 Oct 2023 20:33:26 +0800 Subject: [PATCH 2/2] Fix --- app/Admin/Metrics/StatisticsTotal.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/Admin/Metrics/StatisticsTotal.php b/app/Admin/Metrics/StatisticsTotal.php index d7ad622e..8ce060d1 100644 --- a/app/Admin/Metrics/StatisticsTotal.php +++ b/app/Admin/Metrics/StatisticsTotal.php @@ -61,8 +61,6 @@ class StatisticsTotal extends RadialBar // 卡片内容 $this->withContent([ 'total_points'=> bcdiv(UserInfo::sum('points'), 100, 2), - // 'total_wallet'=> bcdiv(Wallet::sum('balance'), 100, 2), - // 'total_balance'=> bcdiv(Balance::sum('balance'), 100, 2), 'order_money' => bcdiv($order, 100, 2) ]); } @@ -83,16 +81,6 @@ class StatisticsTotal extends RadialBar

{$content['total_points']}

总积分 -
-

{$content['total_wallet']}

- 总可提 -
-
-

{$content['total_balance']}

- 总余额 -
- -

{$content['order_money']}

销售额