wanggangtao %!s(int64=5) %!d(string=hai) anos
pai
achega
1e2aab6f72

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
api/v1.0/api_boniu_get_any_day.php


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
api/v1.0/api_boniu_get_current_day.php


+ 1 - 1
api/v1.0/demo/api_boniu_get_any_day.html

@@ -58,7 +58,7 @@
         <form>
             <p>
                 <span>method:</span>
-                <input type="text" class="input-text"  name="method" value="api_boniu_get_current_day"/>
+                <input type="text" class="input-text"  name="method" value="api_boniu_get_any_day"/>
             </p>
 
             <p>

+ 5 - 4
lib/table/table_day_k.class.php

@@ -216,12 +216,13 @@ class Table_day_k extends Table {
         $sql = "select * from ". $this->table_fullname ." where 1=1 ";
         $where =" and day_k_code=".$stock_code  ;
         if($date==0){//获取的是当天的数据
-            $date = date("Ymd",time());
-            $where.=" and day_k_date = ".$date;
+
+            $date = (int)(strtotime(date("Y-m-d",time())));
+            $where.=" and day_k_timestamp = ".$date;
 
         }else{//获取某一天的数据
             $date = $this->pdo->sql_check_input(array('number', $date));
-            $where.=" and day_k_date =".$date;
+            $where.=" and day_k_timestamp =".$date;
         }
         $sql.=$where;
 
@@ -232,7 +233,7 @@ class Table_day_k extends Table {
 
                 $r[$key] = $this->dataToAttr($val);
             }
-            return $r;
+            return $r[0];
         }else{
             return $r;
         }