6
0
Fork 0

admin orders 添加查询 是否冻结

base
panliang 2023-11-04 13:05:40 +08:00
parent d7cba72afd
commit 74735050a4
2 changed files with 7 additions and 2 deletions

View File

@ -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();

View File

@ -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();
}
/**