hyperf-view/builder/Generator/Stubs/Controller/changeStatus.stub

17 lines
604 B
Plaintext

/**
* 更改数据状态
* @return ResponseInterface
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
#[PutMapping("changeStatus"), Permission("{UPDATE_PERMISSION}"), OperationLog]
public function changeStatus(): ResponseInterface
{
return $this->service->changeStatus(
(int) $this->request->input('{PK}'),
(string) $this->request->input('{STATUS_VALUE}'),
(string) $this->request->input('{STATUS_FIELD}')
) ? $this->success() : $this->error();
}