This commit is contained in:
chenbo 2024-01-31 18:16:55 +08:00
parent d36a73b22d
commit e63dec3f43
6 changed files with 24 additions and 1 deletions

View File

@ -10,7 +10,10 @@ class OperationLogController extends BaseApiController
public function index() public function index()
{ {
$fenceHouseId = $this->request->param('fence_house_id'); $fenceHouseId = $this->request->param('fence_house_id');
$list = AnimalOperateAction::where('fence_house_id', $fenceHouseId)->order('id desc')->limit(5)->select()->toArray(); $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); return $this->success('成功', $list);
} }
} }

View File

@ -61,6 +61,10 @@ class OperationDewormingLogLists extends BaseDataLists implements ListsSearchInt
->limit($this->limitOffset, $this->limitLength) ->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc']) ->order(['id' => 'desc'])
->select() ->select()
->each(function($item){
$item['detail'] = json_decode($item['detail'],true);
return $item;
})
->toArray(); ->toArray();
} }

View File

@ -61,6 +61,10 @@ class OperationDisinfectLogLists extends BaseDataLists implements ListsSearchInt
->limit($this->limitOffset, $this->limitLength) ->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc']) ->order(['id' => 'desc'])
->select() ->select()
->each(function($item){
$item['detail'] = json_decode($item['detail'],true);
return $item;
})
->toArray(); ->toArray();
} }

View File

@ -62,6 +62,10 @@ class OperationFeedingLogLists extends BaseDataLists implements ListsSearchInter
->limit($this->limitOffset, $this->limitLength) ->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc']) ->order(['id' => 'desc'])
->select() ->select()
->each(function($item){
$item['detail'] = json_decode($item['detail'],true);
return $item;
})
->toArray(); ->toArray();
} }

View File

@ -61,6 +61,10 @@ class OperationVaccinumLogLists extends BaseDataLists implements ListsSearchInte
->limit($this->limitOffset, $this->limitLength) ->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc']) ->order(['id' => 'desc'])
->select() ->select()
->each(function($item){
$item['detail'] = json_decode($item['detail'],true);
return $item;
})
->toArray(); ->toArray();
} }

View File

@ -61,6 +61,10 @@ class OperationWaterLogLists extends BaseDataLists implements ListsSearchInterfa
->limit($this->limitOffset, $this->limitLength) ->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc']) ->order(['id' => 'desc'])
->select() ->select()
->each(function($item){
$item['detail'] = json_decode($item['detail'],true);
return $item;
})
->toArray(); ->toArray();
} }