index_csi300.class.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /***
  3. * Class Index_csi300
  4. * * @author 王刚涛
  5. * 日线数据
  6. */
  7. class Index_csi300 {
  8. public function __construct()
  9. {
  10. }
  11. static public function getInfoById($id)
  12. {
  13. $Table_index_csi300 = new Table_index_csi300();
  14. return $Table_index_csi300->getInfoById($id);
  15. }
  16. /****
  17. * @param $attrs
  18. * @return mixed
  19. * @throws Exception
  20. *
  21. */
  22. static public function add($attrs){
  23. if (empty($attrs)) throw new Exception('参数不能为空', 102);
  24. $Table_index_csi300 = new Table_index_csi300();
  25. $id = $Table_index_csi300->add($attrs);
  26. return $id;
  27. }
  28. /***
  29. * @param $attrs
  30. * @param int $date
  31. * @return mixed
  32. * @throws Exception
  33. *
  34. */
  35. static public function insert($attrs)
  36. {
  37. if (empty($attrs)) throw new Exception('参数不能为空', 102);
  38. $Table_index_csi300 = new Table_index_csi300();
  39. $id = $Table_index_csi300->insert($attrs);
  40. return $id;
  41. }
  42. static public function getList($filter = array(), $count=0, $page=0, $pageSize=0)
  43. {
  44. $Table_index_csi300 = new Table_index_csi300();
  45. return $Table_index_csi300->getList($filter, $count, $page, $pageSize);
  46. }
  47. }
  48. ?>