<?php

namespace app\extra\service\system;

use app\extra\basic\Service;
use app\model\system\SystemData;

class DicService extends Service
{


    /**
     * @param array $param
     * @return array
     */
    public function getMenuList(array $param = []): array
    {
        $model = new SystemData();
        try {
            if (!empty($param['dicId'])) {
                $data = $model->where("id",$param['dicId'])->findOrEmpty();
            } else {
                $data = $model->select();
            }
        } catch (\Throwable $throwable) {
            return [];
        }
        return $data->isEmpty()?[]:$data->toArray();
    }

}