index.class.php 1.1 KB

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