diff --git a/app/Service/Admin/System/WarehouseService.php b/app/Service/Admin/System/WarehouseService.php index f9863d4..3b73559 100644 --- a/app/Service/Admin/System/WarehouseService.php +++ b/app/Service/Admin/System/WarehouseService.php @@ -62,6 +62,9 @@ class WarehouseService extends BaseService{ $kitchenId = (int)$this->request->input('kitchen_id'); $info = $this->warehouseKeeperModel->getInfoByUserId($userId); + if (RoleCode::SUPER_ADMIN != $this->roleId && RoleCode::ADMIN != $this->roleId) + throw new ErrException('该角色没有权限'); + if (!empty($info)) { if(!empty($kitchenId)) $info->kitchen_id = $kitchenId;