From 3f3453b78432c74b86ba714de733f9ec7e775f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Mon, 20 Mar 2023 14:37:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/system/config/SystemConfigDao.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crmeb/app/dao/system/config/SystemConfigDao.php b/crmeb/app/dao/system/config/SystemConfigDao.php index 0f8487d76..3d17b5314 100644 --- a/crmeb/app/dao/system/config/SystemConfigDao.php +++ b/crmeb/app/dao/system/config/SystemConfigDao.php @@ -34,20 +34,23 @@ class SystemConfigDao extends BaseDao * 获取某个系统配置 * @param string $configNmae * @return mixed + * @throws \ReflectionException */ public function getConfigValue(string $configNmae) { - return $this->withSearchSelect(['menu_name'], ['menu_name' => $configNmae])->value('value'); + return $this->search(['menu_name' => $configNmae])->value('value'); } /** * 获取所有配置 + * @param array $configName * @return array + * @throws \ReflectionException */ public function getConfigAll(array $configName = []) { if ($configName) { - return $this->withSearchSelect(['menu_name'], ['menu_name' => $configName])->column('value', 'menu_name'); + return $this->search(['menu_name' => $configName])->column('value', 'menu_name'); } else { return $this->getModel()->column('value', 'menu_name'); }