service = EnterpriseService::getInstance(); $this->insertField = ['name']; $this->updateField = ['id', 'name']; $this->notRequest = [ 'logo', 'contact_name', 'phone', 'address', 'tax_no', 'settle_type', 'price_number', 'status', 'remark', ]; } /** * 启用 / 禁用 * @Method POST * @throws Exception */ public function status(): JsonResponse { $this->insertField = ['id', 'status']; $params = $this->checkRequiredFields(request()->post()); return jok($this->service->status($params['id'], $params['status']), '操作成功'); } }