19 lines
581 B
PHP
19 lines
581 B
PHP
<?php
|
|
|
|
namespace app\api\controller;
|
|
|
|
use app\common\model\suyuan_operation\AnimalOperateAction;
|
|
use think\facade\Db;
|
|
|
|
class OperationLogController extends BaseApiController
|
|
{
|
|
public function index()
|
|
{
|
|
$fenceHouseId = $this->request->param('fence_house_id');
|
|
$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();
|
|
return $this->success('成功', $list);
|
|
}
|
|
} |