logic = (new SysDictItemLogic()); } /** * 获取系统list */ public function getList($params) { if (empty($params['dict_id']) && empty($params['dict_code'])) throw new BusinessException('未明确要查询的字典组'); $where = []; if(isset($params['dict_id']) && $params['dict_id']) $where[] = ['dict_id', '=', $params['dict_id']]; if(isset($params['dict_code']) && $params['dict_code']){ $dict = (new SysDictLogic)->getDictByCode($params['dict_code']); if (empty($dict['id'])) throw new BusinessException('字典组code错误'); $where[] = ['dict_id', '=', $dict['id']]; } return $this->logic->getList($where); } }