From 74735050a4bb776c03c8b868d787c2a703e97ee2 Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Sat, 4 Nov 2023 13:05:40 +0800 Subject: [PATCH] =?UTF-8?q?admin=20orders=20=E6=B7=BB=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=20=E6=98=AF=E5=90=A6=E5=86=BB=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/OrderController.php | 5 +++++ app/Console/Kernel.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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(); } /**