day_k.class.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * Class Day_k_base
  4. * @author 王刚涛
  5. * 日线数据
  6. */
  7. class Day_k {
  8. static public function getInfoById($id)
  9. {
  10. $Table_day_k = new Table_day_k();
  11. return $Table_day_k->getInfoById($id);
  12. }
  13. static public function stock_recent_days($code,$start_date,$traceback_days,$order,$fq_price)
  14. {
  15. $Table_day_k = new Table_day_k();
  16. return $Table_day_k->stock_recent_days($code,$start_date,$traceback_days,$order,$fq_price);
  17. }
  18. static public function add($attrs)
  19. {
  20. $Table_day_k = new Table_day_k();
  21. return $Table_day_k->add($attrs);
  22. }
  23. static public function getList($filter = array(), $count=0, $page=0, $pageSize=0)
  24. {
  25. $Table_day_k = new Table_day_k();
  26. return $Table_day_k->getList($filter, $count, $page, $pageSize);
  27. }
  28. /***
  29. * @param array $filter
  30. * @param int $count
  31. * @param int $page
  32. * @param int $pageSize
  33. * @return mixed
  34. * 获取历史日K数据
  35. */
  36. static public function get_day_k_info($code,$start_date,$end_date,$order,$fq_price)
  37. {
  38. $Table_day_k = new Table_day_k();
  39. return $Table_day_k->get_day_k_info($code,$start_date,$end_date,$order,$fq_price);
  40. }
  41. static public function get_current_day_k($code,$date,$fq_price)
  42. {
  43. $Table_day_k = new Table_day_k();
  44. return $Table_day_k->get_current_day_k($code,$date,$fq_price);
  45. }
  46. /***
  47. * @param $attrs
  48. * @param int $date
  49. * @return mixed
  50. * @throws Exception
  51. * 添加某一直股票的历史数据
  52. */
  53. static public function insert($attrs,$date=0)
  54. {
  55. $Table_day_k = new Table_day_k($date);
  56. $id = $Table_day_k->insert($attrs);
  57. return $id;
  58. }
  59. static public function HistoryDayK($attrs)
  60. {
  61. $Table_day_k = new Table_day_k();
  62. $id = $Table_day_k->HistoryDayK($attrs);
  63. return $id;
  64. }
  65. }
  66. ?>