getlistforadmin($where, true); if ($count <= 0) { return backarr(0, "无数据"); } $list = $m_e->getlistforadmin($where, false, $page, $size); foreach ($list as $key => $value) { switch ($value['sourcetype']) { case 1: $m_i = new inventmodel(); $where = ['id' => $value['sourceid']]; $info = $m_i->getInfo($where); $list[$key]['code'] = empty($info) ? '' : $info['code']; $list[$key]['isactive'] = empty($info) ? '' : $info['isactive']; break; case 2: $m_j = new jobhuntingmodel(); $where = ['id' => $value['sourceid']]; $info = $m_j->getInfo($where); $list[$key]['isactive'] = empty($info) ? '' : $info['isactive']; break; } } $data = [ 'count' => $count, 'list' => $list, ]; return backarr(1, "查询成功", $data); } }