order('id', 'desc')->column('name', 'id'); return $this->toData('0', 'SUCCESS', ['list' => $list]); } catch (\Exception $e) { return $this->toData('1', '系统繁忙', [$e->getMessage(), $e->getTrace()]); } } // 黄金期货列表 public function inrStockIndexList($param): array { try { if (empty($param['page']) || empty($param['limit'])) { return $this->toData('400', '缺少必要参数'); } $where = []; if (!empty($param['trade_name'])) { $where[] = ['trade_name', 'like', '%' . $param['trade_name'] . '%']; } $list = GoldFuturesListModel::where($where)->order('id', 'desc')->paginate([ 'page' => $param['page'], 'list_rows' => $param['limit'], ]); $tapeList = (new IPOService())->getStockTape(20); return $this->toData('0', 'SUCCESS', [ 'list' => $list->items(), 'total' => $list->total(), 'page' => $list->currentPage(), 'last_page' => $list->lastPage(), 'extend' => [ 'tape_list' => $tapeList['tape'], 'source_list' => $tapeList['source'] ?? [], ] ]); } catch (\Exception $e) { return $this->toData('500', '系统繁忙', [$e->getMessage(), $e->getTrace()]); } } }