From 89fdc19046a1c37722652d4a1d164ae9ceb5dd11 Mon Sep 17 00:00:00 2001 From: weiz Date: Wed, 29 Nov 2023 17:59:24 +0800 Subject: [PATCH] update --- app/api/controller/ActionController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/ActionController.php b/app/api/controller/ActionController.php index 56aa407b..f66fc912 100644 --- a/app/api/controller/ActionController.php +++ b/app/api/controller/ActionController.php @@ -113,7 +113,7 @@ if(empty($params['plant_id']) || empty($params['type'])){ return $this->fail('缺少必要参数'); } - $data = Action::where('plant_id',$params['plant_id'])->where('type',$params['type'])->select()->each(function($item){ + $data = Action::where('plant_id',$params['plant_id'])->where('type',$params['type'])->order('create_time desc')->select()->each(function($item){ $item['detail'] = json_decode($item['detail'],true); return $item; })->toArray();