diff --git a/app/Admin/Controllers/OrderController.php b/app/Admin/Controllers/OrderController.php index aa61e530..abc75975 100644 --- a/app/Admin/Controllers/OrderController.php +++ b/app/Admin/Controllers/OrderController.php @@ -195,6 +195,7 @@ class OrderController extends AdminController })->circleDot(PayWay::colors()); $grid->column('pay_at'); $grid->column('created_at')->sortable(); + $grid->column('wx_share', '是否冻结')->display(fn() => data_get($this->wx_share, 'status') == 'Y' ? '是' : '否'); $grid->filter(function (Grid\Filter $filter) { $filter->panel(); @@ -253,6 +254,10 @@ class OrderController extends AdminController ])->width(3); $filter->between('created_at')->dateTime()->width(6); $filter->like('pay_sn')->width(3); + $filter->where('wx_share_status', function ($q) { + $q->when($this->input == 'Y', fn($q1) => $q1->where('wx_share->status', $this->input)); + $q->when($this->input != 'Y', fn($q1) => $q1->where('wx_share->status', $this->input)->orWhereNull('wx_share')); + } , '是否冻结')->select(['Y' => '是', 'N' => '否'])->width(3); }); $user = Admin::user(); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 28c7e1df..2842b0b7 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -24,8 +24,8 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - $schedule->command('order-profit:check')->daily(); - $schedule->command('order-profit:send')->dailyAt('2:00'); + $schedule->command('order-profit:send')->daily(); + $schedule->command('order-profit:check')->everySixHours(); } /**