瀏覽代碼

update: commission stats

tokumeikoi 2 年之前
父節點
當前提交
30f0166ed1
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/Console/Commands/V2boardStatistics.php

+ 3 - 3
app/Console/Commands/V2boardStatistics.php

@@ -53,10 +53,10 @@ class V2boardStatistics extends Command
             ->whereNotIn('status', [0, 2]);
             ->whereNotIn('status', [0, 2]);
         $orderCount = $orderBuilder->count();
         $orderCount = $orderBuilder->count();
         $orderAmount = $orderBuilder->sum('total_amount');
         $orderAmount = $orderBuilder->sum('total_amount');
-        $commissionBuilder = Order::where('created_at', '>=', $startAt)
+        $commissionLogBuilder = CommissionLog::where('created_at', '>=', $startAt)
             ->where('created_at', '<', $endAt);
             ->where('created_at', '<', $endAt);
-        $commissionCount = $commissionBuilder->count();
-        $commissionAmount = $commissionBuilder->sum('actual_commission_balance');
+        $commissionCount = $commissionLogBuilder->count();
+        $commissionAmount = $commissionLogBuilder->sum('get_amount');
         $data = [
         $data = [
             'order_count' => $orderCount,
             'order_count' => $orderCount,
             'order_amount' => $orderAmount,
             'order_amount' => $orderAmount,