更新部分的内容,同步数据
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user