Compare commits

...

2 Commits

Author SHA1 Message Date
weiz 616b38a6d7 Merge pull request 'update' (#30) from zhangwei into dev
Reviewed-on: #30
2023-11-29 17:27:53 +08:00
weiz ea4a0b9247 update 2023-11-29 17:27:35 +08:00
1 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,9 @@
return $this->fail('缺少必要参数'); return $this->fail('缺少必要参数');
} }
$data = Db::query("SELECT * FROM zzsy_land_plant_action WHERE id IN (SELECT max( id ) FROM zzsy_land_plant_action WHERE plant_id = {$params['plant_id']} GROUP BY type)"); $data = Db::query("SELECT * FROM zzsy_land_plant_action WHERE id IN (SELECT max( id ) FROM zzsy_land_plant_action WHERE plant_id = {$params['plant_id']} GROUP BY type)");
foreach($data as $k=>$v){
$data[$k]['detail'] = json_decode($v['detail'],true);
}
return $this->success('请求成功',$data); return $this->success('请求成功',$data);
} }