更新
This commit is contained in:
@@ -42,7 +42,8 @@ class PrescriptionLibraryController extends BaseAdminController
|
||||
public function edit()
|
||||
{
|
||||
$params = (new PrescriptionLibraryValidate())->post()->goCheck('edit');
|
||||
$result = PrescriptionLibraryLogic::edit($params, $this->adminId);
|
||||
$canAll = PrescriptionLibraryLogic::canManageAllPrescriptions($this->adminId, $this->adminInfo);
|
||||
$result = PrescriptionLibraryLogic::edit($params, $this->adminId, $canAll);
|
||||
if (!$result) {
|
||||
return $this->fail(PrescriptionLibraryLogic::getError());
|
||||
}
|
||||
@@ -55,7 +56,8 @@ class PrescriptionLibraryController extends BaseAdminController
|
||||
public function delete()
|
||||
{
|
||||
$params = (new PrescriptionLibraryValidate())->post()->goCheck('delete');
|
||||
$result = PrescriptionLibraryLogic::delete($params['id'], $this->adminId);
|
||||
$canAll = PrescriptionLibraryLogic::canManageAllPrescriptions($this->adminId, $this->adminInfo);
|
||||
$result = PrescriptionLibraryLogic::delete((int) $params['id'], $this->adminId, $canAll);
|
||||
if (!$result) {
|
||||
return $this->fail(PrescriptionLibraryLogic::getError());
|
||||
}
|
||||
@@ -68,7 +70,8 @@ class PrescriptionLibraryController extends BaseAdminController
|
||||
public function detail()
|
||||
{
|
||||
$params = (new PrescriptionLibraryValidate())->get()->goCheck('detail');
|
||||
$detail = PrescriptionLibraryLogic::detail((int)$params['id'], $this->adminId);
|
||||
$canAll = PrescriptionLibraryLogic::canManageAllPrescriptions($this->adminId, $this->adminInfo);
|
||||
$detail = PrescriptionLibraryLogic::detail((int) $params['id'], $this->adminId, $canAll);
|
||||
if (!$detail) {
|
||||
return $this->fail('处方不存在或无权限查看');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user