findByUidsString (3,5,7)

public function findByUidsString($uids) {
    $uidArray = explode(",", $uids);
    $query = $this->createQuery();
    $query->getQuerySettings()->setRespectStoragePage(false);
    $query->matching(
        $query->in('uid', $uidArray),
        $query->logicalAnd(
            $query->equals('hidden', 0),
            $query->equals('deleted', 0)
        )
    );
    $query->setOrderings($this->orderByUidsString('uid', $uidArray)); 
    return $query->execute();
}
protected function orderByUidsString($field, $values) {
    $orderArray = array();
    foreach ($values as $value) {
        $orderArray["$field={$value}"] = \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING;
    }
    return $orderArray;
}