getInfoById($id); } static public function getInfoByCodeAndDate($code, $date) { $Table_index_day_k = new Table_index_day_k(); return $Table_index_day_k->getInfoByCodeAndDate($code, $date); } static public function getList($filter = array(), $count=0, $page=0, $pagesize=0, $order=0, $limit = 0) { $Table_index_day_k = new Table_index_day_k(); return $Table_index_day_k->getList($filter, $count, $page, $pagesize, $order, $limit); } static public function getAllList() { $Table_index_day_k = new Table_index_day_k(); return $Table_index_day_k->getList(); } static public function addOrUpdateByCodeDate($attrs) { if (empty($attrs)) throw new Exception('参数不能为空', 101); if (empty($attrs['code'])) throw new Exception('股票代码不能为空', 102); if (empty($attrs['date'])) throw new Exception('日期不能为空', 103); $Table_index_day_k = new Table_index_day_k(); $id = $Table_index_day_k->addOrUpdateByCodeDate($attrs); return $id; } //---------------------------------------- static public function add($attrs){ if (empty($attrs)) throw new Exception('参数不能为空', 102); $Table_index_day_k = new Table_index_day_k(); $id = $Table_index_day_k->add($attrs); return $id; } static public function insert($attrs) { if (empty($attrs)) throw new Exception('参数不能为空', 102); $Table_index_day_k = new Table_index_day_k(); $id = $Table_index_day_k->insert($attrs); return $id; } /** * @param $start_date * @param $end_date * @param $index_type * @param $num * @param $order * @return array * wanggangtao * 获取时间段指数信息 */ static public function getIndexListHistroy($code,$start_date,$end_date,$order) { $Table_index_day_k = new Table_index_day_k(); return $Table_index_day_k->getIndexListHistroy($code,$start_date,$end_date,$order); } /*** * @param $code * @param $date * @return array * 获取某天的指数数据和当天的指数数据 */ static public function get_current_day_index($code,$date) { $Table_index_day_k = new Table_index_day_k(); return $Table_index_day_k->get_current_day_index($code,$date); } } ?>