update
This commit is contained in:
parent
9f5bed1aa6
commit
a65aecd7cf
|
@ -135,9 +135,10 @@ class AnimalInfoLogic extends BaseLogic
|
|||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = AnimalInfo::with(['fenceHouseAttr'])->findOrEmpty($params['id'])->toArray();
|
||||
if (isset($params['sn'])) {
|
||||
$data = AnimalInfo::with(['fenceHouseAttr'])->where('sn', $params['sn'])->findOrEmpty()->toArray();
|
||||
} else {
|
||||
$data = AnimalInfo::with(['fenceHouseAttr'])->findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
// 查动物体温
|
||||
$res = RemoteRequestLogic::requestAnimalTemperature($data['sn']);
|
||||
|
|
Loading…
Reference in New Issue