dao = $dao; } public function create($data) { return $this->dao->create($data); } /** * @param SharedProsperityRecommendConfigEntity $sharedProsperityRecommendConfigEntity * @return SharedProsperityRecommendConfigEntity */ public function createByEntity(SharedProsperityRecommendConfigEntity $sharedProsperityRecommendConfigEntity): SharedProsperityRecommendConfigEntity { $result = $this->create($sharedProsperityRecommendConfigEntity->toUnderlineArray())->toArray(); /** @var SharedProsperityRecommendConfigEntity $entity */ $entity = SharedProsperityRecommendConfigEntity::newInstance($result); return $entity; } /** * @return array * @author 史晨 * @date 2026/2/5 14:12 */ public function getList(): array { return $this->dao->getConfigList(); } /** * @param $id * @return array * @author 史晨 * @date 2026/2/5 14:12 */ public function getDetail($id) { return $this->dao->getDetailById($id); } /** * @param $params * @return bool * @author 史晨 * @date 2026/2/5 14:12 */ public function update($params) { $id = $params['id']; unset($params['id']); if (!$this->dao->update($id, $params)){ return false; } return true; } }