'=', 'channel' => '=', 'user_id' => '=', 'worker_id' => '=', ]; protected array $quickSearchField = ['withdraw_no']; #[GetRoute(authorize: 'query')] public function query(Request $request): JsonResponse { $params = $request->all(); $pageSize = $params['pageSize'] ?? 10; $query = RunnerWithdrawalModel::query(); $data = $this->buildSearch($params, $query) ->paginate($pageSize) ->toArray(); return $this->success($data); } #[PutRoute( route: '/{id}', authorize: 'update', where: ['id' => '[0-9]+'] )] public function update(int $id, RunnerWithdrawalFormRequest $request): JsonResponse { $model = RunnerWithdrawalModel::find($id); if (empty($model)) { return $this->error('提现记录不存在'); } $model->update($request->validated()); return $this->success(); } #[DeleteRoute( route: '/{id}', authorize: 'delete', where: ['id' => '[0-9]+'] )] public function delete(int $id): JsonResponse { $model = RunnerWithdrawalModel::find($id); if (empty($model)) { return $this->error('提现记录不存在'); } $model->delete(); return $this->success(); } }