| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- /***
- * Class Index
- * * @author 王刚涛
- * 日线数据
- */
- class Index {
- static public function getInfoById($id)
- {
- $Table_index = new Table_index();
- return $Table_index->getInfoById($id);
- }
- static public function getInfoByCode($code)
- {
- $Table_index = new Table_index();
- return $Table_index->getInfoByCode($code);
- }
- static public function getList($filter = array(), $count=0, $page=0, $pagesize=0, $order=0)
- {
- $Table_index = new Table_index();
- return $Table_index->getList($filter, $count, $page, $pagesize, $order);
- }
- static public function getAllList()
- {
- $Table_index = new Table_index();
- return $Table_index->getList();
- }
- static public function addOrUpdateByCode($attrs)
- {
- if (empty($attrs)) throw new Exception('参数不能为空', 101);
- if (empty($attrs['code'])) throw new Exception('股票代码不能为空', 102);
- $Table_index = new Table_index();
- $id = $Table_index->addOrUpdateByCode($attrs);
- return $id;
- }
- }
- ?>
|