fix:warehouse_keeper

This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-02-13 10:55:19 +08:00
parent 5b4eef5675
commit 9084f39837

View File

@@ -62,6 +62,9 @@ class WarehouseService extends BaseService{
$kitchenId = (int)$this->request->input('kitchen_id'); $kitchenId = (int)$this->request->input('kitchen_id');
$info = $this->warehouseKeeperModel->getInfoByUserId($userId); $info = $this->warehouseKeeperModel->getInfoByUserId($userId);
if (RoleCode::SUPER_ADMIN != $this->roleId && RoleCode::ADMIN != $this->roleId)
throw new ErrException('该角色没有权限');
if (!empty($info)) { if (!empty($info)) {
if(!empty($kitchenId)) if(!empty($kitchenId))
$info->kitchen_id = $kitchenId; $info->kitchen_id = $kitchenId;