mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 14:31:04 +00:00
更新配置搜索
This commit is contained in:
parent
d4a9167edb
commit
3f3453b784
@ -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');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user