| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- /**
- * Class Day_k_base
- * @author 王刚涛
- * 日线数据
- */
- class Day_k_base {
- /***
- * @param $attrs
- * @return mixed
- * @throws Exception
- * 添加股票的某一天数据信息
- */
- static public function add($attrs,$date=0)
- {
- if (empty($attrs)) throw new Exception('参数不能为空', 102);
- if($date===0)
- {
- $date=strtotime(date('Ym'));
- }
- $Table_day_k_base = new Table_day_k_base($date);
- $id = $Table_day_k_base->add($attrs);
- return $id;
- }
- /***
- * @param $attrs
- * @param int $date
- * @return mixed
- * @throws Exception
- * 添加某一直股票的历史数据
- */
- static public function insert($attrs,$date=0)
- {
- if (empty($attrs)) throw new Exception('参数不能为空', 102);
- if($date===0)
- {
- $date=strtotime(date('Ym'));
- }
- $Table_day_k_base = new Table_day_k_base($date);
- $id = $Table_day_k_base->insert($attrs);
- return $id;
- }
- /**
- * 管理员日志记录列表
- *
- * @param $page 当前页
- * @param $pagesize 每页大小
- *
- */
- static public function getListByPage($page, $pagesize){
- $filter = array();
- $Table_day_k_base = new Table_day_k_base();
- return $Table_day_k_base->getList($filter, 0, $page, $pagesize);
- }
-
- //管理员日志总数
- static public function getCountAll(){
- $filter = array();
- $Table_day_k_base = new Table_st_log();
- return $Table_day_k_base->getList($filter, 1);
- }
- }
- ?>
|