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; } /** * @param $mobile * @return array|\think\db\BaseQuery|\think\Model|null * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException * @author 史晨 * @date 2025/10/20 17:21 * 获取用户实名信息 */ public function getUserCertification($mobile) { return $this->getModel()::getDB()->where('mobile', $mobile)->find(); } }