2024-01-29 18:05:07 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace app\api\controller;
|
|
|
|
|
2024-01-31 17:44:40 +08:00
|
|
|
use app\common\model\suyuan_operation\AnimalOperateAction;
|
2024-01-29 18:05:07 +08:00
|
|
|
use think\facade\Db;
|
|
|
|
|
|
|
|
class OperationLogController extends BaseApiController
|
|
|
|
{
|
|
|
|
public function index()
|
|
|
|
{
|
|
|
|
$fenceHouseId = $this->request->param('fence_house_id');
|
2024-01-31 18:16:55 +08:00
|
|
|
$list = AnimalOperateAction::where('fence_house_id', $fenceHouseId)->order('id desc')->limit(5)->select()->each(function($item){
|
|
|
|
$item['detail'] = json_decode($item['detail'],true);
|
|
|
|
return $item;
|
|
|
|
})->toArray();
|
2024-01-29 18:05:07 +08:00
|
|
|
return $this->success('成功', $list);
|
|
|
|
}
|
|
|
|
}
|