whereIn('id', $idList) ->select() ->toArray(); if (!empty($dataList)) { $entityList = array_map(function ($data) { return UserCertificationEntity::newInstance($data); }, $dataList); } } catch (DataNotFoundException|ModelNotFoundException|DbException $e) { } return $entityList; } /** * @param array $uidList * @return UserCertificationEntity[] */ public function getUserCertificationEntityListByUidList(array $uidList): array { $entityList = []; try { $dataList = UserCertification::getDB() ->whereIn('uid', $uidList) ->select() ->toArray(); if (!empty($dataList)) { $entityList = array_map(function ($data) { return UserCertificationEntity::newInstance($data); }, $dataList); } } catch (DataNotFoundException|ModelNotFoundException|DbException $e) { } return $entityList; } }