diff --git a/app/adminapi/logic/animal_info/AnimalInfoLogic.php b/app/adminapi/logic/animal_info/AnimalInfoLogic.php index 7b19016..af7c09f 100644 --- a/app/adminapi/logic/animal_info/AnimalInfoLogic.php +++ b/app/adminapi/logic/animal_info/AnimalInfoLogic.php @@ -135,7 +135,7 @@ class AnimalInfoLogic extends BaseLogic public static function detail($params): array { if (isset($params['sn'])) { - return AnimalInfo::with(['fenceHouseAttr'])->where('sn', $params['sn'])->toArray(); + return AnimalInfo::with(['fenceHouseAttr'])->where('sn', $params['sn'])->findOrEmpty($params['id'])->toArray(); } return AnimalInfo::with(['fenceHouseAttr'])->findOrEmpty($params['id'])->toArray();