git 2 years ago
parent
commit
c3817fa2cf

+ 1 - 1
Home/Lib/Action/CatchFdRouteKafkaAction.class.php

@@ -112,7 +112,7 @@ class CatchFdRouteKafkaAction extends Action {
 		// 存入数据库
 		$cond = array('imei'=>$info['DeviceId']);
 		
-		if($info['DeviceTime'] < (time()-3600) ){
+		if($info['DeviceTime'] < (time()-3600*24) ){
 			return false;
 		}
 		if($info['WifiMacs']){

+ 3 - 3
Home/Lib/Action/WxApiAction.class.php

@@ -251,7 +251,7 @@ class WxApiAction extends Action {
 			if(!$locationInfo['time']){
 				$locationInfo['awayTime'] = '从未在线';
 			}else{
-				$timeInterval = time() -  (int)$locationInfo['time'];
+				$timeInterval = time() -  (int)strtotime($locationInfo['time']);
 				$locationInfo['awayTime'] = $this->getHumenTime($timeInterval);
 			}
 			$lngLatAlter = new \Jms\Algo\Geometry();
@@ -267,7 +267,7 @@ class WxApiAction extends Action {
 			
 		
 		
-			$locationInfo['date_time'] = date('Y-m-d H:i:s', $locationInfo['time']);
+			$locationInfo['date_time'] =$locationInfo['time'];
 			array_push($resp, $locationInfo);
 		
 		}
@@ -487,7 +487,7 @@ class WxApiAction extends Action {
 				$v['lat'] = $v['Latitude'];
 				$v['lng'] = $v['Longitude'];
 				if($v['lat']){
-					array_push($arr, $v);
+					array_unshift($arr, $v);
 				}
 			}
 		$routeInfo =$arr;