mirror of
https://github.com/v2board/v2board.git
synced 2025-02-11 07:59:11 +08:00
update
This commit is contained in:
parent
50e98f5eaf
commit
28b814db36
@ -39,7 +39,7 @@ class CheckCommission extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$order = Order::where('commission_status', 0)
|
$order = Order::where('commission_status', 1)
|
||||||
->where('status', 3)
|
->where('status', 3)
|
||||||
->get();
|
->get();
|
||||||
foreach ($order as $item) {
|
foreach ($order as $item) {
|
||||||
@ -48,7 +48,7 @@ class CheckCommission extends Command
|
|||||||
if (!$inviter) continue;
|
if (!$inviter) continue;
|
||||||
$inviter->commission_balance = $inviter->commission_balance + $item->commission_balance;
|
$inviter->commission_balance = $inviter->commission_balance + $item->commission_balance;
|
||||||
if ($inviter->save()) {
|
if ($inviter->save()) {
|
||||||
$item->commission_status = 1;
|
$item->commission_status = 2;
|
||||||
$item->save();
|
$item->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ class Kernel extends ConsoleKernel
|
|||||||
{
|
{
|
||||||
$schedule->command('check:order')->everyMinute();
|
$schedule->command('check:order')->everyMinute();
|
||||||
$schedule->command('check:expire')->everyMinute();
|
$schedule->command('check:expire')->everyMinute();
|
||||||
$schedule->command('check:commission')->daily();
|
$schedule->command('check:commission')->hourly();
|
||||||
// $schedule->command('inspire')
|
// $schedule->command('inspire')
|
||||||
// ->hourly();
|
// ->hourly();
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ class OrderController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$order->update($updateData)) {
|
if (!$order->update($updateData)) {
|
||||||
abort(500, '保存失败');
|
abort(500, '更新失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
return response([
|
return response([
|
||||||
|
Loading…
Reference in New Issue
Block a user