index.class.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /***
  3. * Class Index_sh50
  4. * * @author 王刚涛
  5. * 日线数据
  6. */
  7. class Index {
  8. public function __construct()
  9. {
  10. }
  11. /***
  12. * @return array
  13. * wanggangtao
  14. * 获取指数列表
  15. */
  16. static public function getIndexList()
  17. {
  18. $Table_index = new Table_index();
  19. return $Table_index->getIndexList();
  20. }
  21. /**
  22. * @return mixed
  23. * 各种指数入库
  24. */
  25. static public function get_index($code,$exchange)
  26. {
  27. $Table_index = new Table_index();
  28. return $Table_index->get_index($code,$exchange);
  29. }
  30. static public function getInfoById($id)
  31. {
  32. $Table_index = new Table_index();
  33. return $Table_index->getInfoById($id);
  34. }
  35. static public function insert($attrs)
  36. {
  37. if (empty($attrs)) throw new Exception('参数不能为空', 102);
  38. $Table_index = new Table_index();
  39. $id = $Table_index->insert($attrs);
  40. return $id;
  41. }
  42. static public function add($attrs){
  43. if (empty($attrs)) throw new Exception('参数不能为空', 102);
  44. $Table_index = new Table_index();
  45. $id = $Table_index->add($attrs);
  46. return $id;
  47. }
  48. }
  49. ?>