This commit is contained in:
chenbo 2024-01-30 09:35:19 +08:00
parent 51e80acad3
commit fa932f41dd
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class IndexController extends BaseApiController
}
$product = Product::where('fence_house_id', $data['id'])->findOrEmpty()->toArray();
if(empty($product)){
return $this->fail('栏舍暂未绑定产品',[]);
return $this->fail('栏舍暂未绑定设备',[]);
}
$deviceIds = ProductDevice::where('product_id', $product['id'])->column('device_id');
$device = Device::whereIn('id', $deviceIds)->where('type', 2)->findOrEmpty();