wanggangtao 5 년 전
부모
커밋
9c27d86a38
2개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      api/v1.0/stock_any_day.php
  2. 8 2
      lib/table/table_day_k.class.php

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
api/v1.0/stock_any_day.php


+ 8 - 2
lib/table/table_day_k.class.php

@@ -208,7 +208,13 @@ class Table_day_k extends Table {
         }
     }
 
-
+    /****
+     * @param $code
+     * @param $date
+     * @return array|mixed
+     * 获取股票的某天和当天的数据
+     * 当获取某天的数据不存在,返回空,当天的数据不存在,返回最近一个交易日的信息
+     */
     public function get_current_day_k($code,$date)
     {
         //查询语句必须用sql_check_input检查参数
@@ -223,7 +229,7 @@ class Table_day_k extends Table {
 
         }else{//获取某一天的数据
             $date = $this->pdo->sql_check_input(array('number', $date));
-            $where.=" and day_k_date <=".$date;
+            $where.=" and day_k_date =".$date;
         }
         $sql.=$where;
         $order=" order by day_k_date desc limit 1 ";