index_day_k.class.php 1.7 KB

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