update
This commit is contained in:
parent
24c38b1c69
commit
21f66551f4
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue