tongshanglei 2 年之前
父节点
当前提交
1968b6bcb8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      catch/device/model/Station.php

+ 1 - 1
catch/device/model/Station.php

@@ -131,7 +131,7 @@ class Station extends Model
     {
         $time=date('Y-m-d H:i:s',time()-300);
         if($value=='1'){
-            return $query->where('online_time', '>=', $time);
+            return $query->where('online_time', '>=', $time)->whereOr('online_state','=', 1);
         }elseif($value=='2'){
             return $query->where(function ($query) use( $time) {
                 $query->whereOr('online_time','<', $time)->whereOr('online_time','=', null);