diff --git a/app/api/controller/dataview/FarmController.php b/app/api/controller/dataview/FarmController.php index 0d773d8..6b04455 100644 --- a/app/api/controller/dataview/FarmController.php +++ b/app/api/controller/dataview/FarmController.php @@ -152,6 +152,11 @@ class FarmController extends BaseApiController // 请求mqtt接口 $list = RemoteRequestLogic::getAlarmData($deviceList); + foreach($list as $k=>$v){ + if(time() - strtotime($v['alarm_time']) > 604800){ + unset($list[$k]); + } + } return $this->success('成功', compact('list')); }