getModel(); $dataRes = $model::getDB() ->select() ->toArray(); if (!empty($dataRes)) { $entityList = array_map(function ($data) { return SharedProsperityRecommendConfigEntity::newInstance($data); }, $dataRes); } } catch (\Exception $e) { } return $entityList; } /** * @param $id * @return mixed * @author 史晨 * @date 2026/2/5 14:43 * 获取推荐配置详情 */ public function getDetailById($id) { /** @var SharedProsperityRecommendConfig $model */ $model = $this->getModel(); return $model::getDB() ->where(['id'=>$id]) ->find(); } }