diff --git a/app/adminapi/controller/device/DeviceController.php b/app/adminapi/controller/device/DeviceController.php index 9d1475d..fc30a86 100644 --- a/app/adminapi/controller/device/DeviceController.php +++ b/app/adminapi/controller/device/DeviceController.php @@ -134,7 +134,7 @@ class DeviceController extends BaseAdminController $iccid = $this->request->param('iccid', ''); $deviceId = $this->request->param('deviceId', ''); // 判断设备编码是否被使用 - $device = Device::where('sn', $deviceId)->find(); + $device = Device::where('code', $deviceId)->find(); if ($device) { return $this->fail('设备编码已被使用'); }