更新部分的内容,同步数据

This commit is contained in:
panx
2025-05-03 08:52:41 +08:00
parent 24091459b5
commit b87f3eae94
10 changed files with 652 additions and 42 deletions

View File

@@ -77,4 +77,33 @@ class PdmPurchasecode extends AdminController
}
/**
* 修改资源状态 -EOL
* @return Response|void
*/
public function statusEol()
{
if (request()->isAjax()) {
$where[] = ['id', '=', input('id')];
if (!$this->authService->SuperAdmin() && $this->dataLimit
&& in_array($this->dataLimitField, $this->model->getFields())) {
$where[] = [$this->dataLimitField, '=', get_admin_id()];
}
try {
$this->status = $this->model->where($where)->update(['eol' => input('eol')]);
} catch (\Throwable $th) {
return $this->error($th->getMessage());
}
if ($this->status) {
return $this->success();
}
}
return $this->error();
}
}