12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace app\dao\system\config;
- use app\dao\BaseDao;
- use app\model\system\config\SystemGroup;
- class SystemGroupDao extends BaseDao
- {
-
- protected function setModel(): string
- {
- return SystemGroup::class;
- }
-
- public function getGroupList(array $where, array $field = ['*'], int $page = 0, int $limit = 0)
- {
- return $this->search($where)->field($field)->when($page && $limit, function ($query) use ($page, $limit) {
- $query->page($page, $limit);
- })->select()->toArray();
- }
-
- public function getConfigNameId(string $configName)
- {
- return $this->value(['config_name' => $configName]);
- }
- }
|