order:profit update profit_paid
parent
741cd2bbe8
commit
522b1b06f4
|
|
@ -42,6 +42,7 @@ class OrderProfitCommand extends Command
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
|
||||||
$service = new DistributeService();
|
$service = new DistributeService();
|
||||||
|
|
||||||
// 售后过期天数 7
|
// 售后过期天数 7
|
||||||
|
|
@ -78,9 +79,11 @@ class OrderProfitCommand extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
// 没有待付款的提成记录
|
// 没有待付款的提成记录
|
||||||
// if (!$order->profits()->where('status', 0)->exists()) {
|
Order::where(fn($q) => $q->whereHas('profits', fn($q) => $q->where('status', 2))->orWhereDoesntHave('profits'))
|
||||||
// $order->update(['profit_paid' => now()]);
|
// 售后期过了
|
||||||
// }
|
->where('completed_at', '<', now()->subDays($saleDays))
|
||||||
|
->whereNull('profit_paid')
|
||||||
|
->update(['profit_paid' => now()]);
|
||||||
|
|
||||||
$page++;
|
$page++;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue