index_day_k.class.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * Class Day_k_base
  4. * @author 王刚涛
  5. * 日线数据
  6. */
  7. class Index_day_k {
  8. public function __construct()
  9. {
  10. }
  11. /***
  12. * @param $code
  13. * @param $start_date
  14. * @param $traceback_days
  15. * @param $order
  16. * @return mixed
  17. * wanggangtao
  18. * 指数最近n天的数据
  19. */
  20. static public function index_recent_days($code,$start_date,$traceback_days,$order)
  21. {
  22. $Table_index_day_k = new Table_index_day_k();
  23. return $Table_index_day_k->index_recent_days($code,$start_date,$traceback_days,$order);
  24. }
  25. static public function getInfoById($id)
  26. {
  27. $Table_index_day_k = new Table_index_day_k();
  28. return $Table_index_day_k->getInfoById($id);
  29. }
  30. static public function add($attrs){
  31. if (empty($attrs)) throw new Exception('参数不能为空', 102);
  32. $Table_index_day_k = new Table_index_day_k();
  33. $id = $Table_index_day_k->add($attrs);
  34. return $id;
  35. }
  36. static public function getList($filter = array(), $count=0, $page=0, $pageSize=0)
  37. {
  38. $Table_index_day_k = new Table_index_day_k();
  39. return $Table_index_day_k->getList($filter, $count, $page, $pageSize);
  40. }
  41. static public function insert($attrs)
  42. {
  43. if (empty($attrs)) throw new Exception('参数不能为空', 102);
  44. $Table_index_day_k = new Table_index_day_k();
  45. $id = $Table_index_day_k->insert($attrs);
  46. return $id;
  47. }
  48. /**
  49. * @param $start_date
  50. * @param $end_date
  51. * @param $index_type
  52. * @param $num
  53. * @param $order
  54. * @return array
  55. * wanggangtao
  56. */
  57. static public function getIndexListHistroy($start_date,$end_date,$index_type,$num,$order)
  58. {
  59. $Table_index_day_k = new Table_index_day_k();
  60. return $Table_index_day_k->getIndexListHistroy($start_date,$end_date,$index_type,$num,$order);
  61. }
  62. static public function get_current_day_index($index_type,$date)
  63. {
  64. $Table_index_day_k = new Table_index_day_k();
  65. return $Table_index_day_k->get_current_day_index($index_type,$date);
  66. }
  67. }
  68. ?>