This commit is contained in:
chenbo 2024-02-03 11:17:17 +08:00
parent 24c38b1c69
commit 21f66551f4
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class AnimalInfoLogic extends BaseLogic
public static function detail($params): array public static function detail($params): array
{ {
if (isset($params['sn'])) { 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(); return AnimalInfo::with(['fenceHouseAttr'])->findOrEmpty($params['id'])->toArray();