From 80d4bc43c5320ab3a57d46d816052fe5bc7c190e Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Wed, 21 Sep 2022 10:58:06 +0800 Subject: [PATCH] order profit --- app/Console/Commands/OrderProfitCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/OrderProfitCommand.php b/app/Console/Commands/OrderProfitCommand.php index 9928ff09..c9e6ae32 100644 --- a/app/Console/Commands/OrderProfitCommand.php +++ b/app/Console/Commands/OrderProfitCommand.php @@ -67,7 +67,7 @@ class OrderProfitCommand extends Command OrderProfit::whereIn('order_id', $orders->pluck('id'))->where('status', 0)->update(['status' => 4]); // 获取 等待结算 的提成记录, 按照 user_id 分组 - $list = OrderProfit::where('status', 4)->get()->groupBy('user_id'); + $list = OrderProfit::where('status', 4)->whereIn('order_id', $orders->pluck('id'))->get()->groupBy('user_id'); foreach($list as $id => $items) { try { DB::beginTransaction();