Commit 4c342fd9 authored by 马33's avatar 马33

限制绑定接口

parent 42bb9085
...@@ -78,7 +78,11 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme ...@@ -78,7 +78,11 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
Device device = deviceMapper.selectOne(queryWrapper); Device device = deviceMapper.selectOne(queryWrapper);
if (device != null) { if (device != null) {
if (!StringUtils.isEmpty(device.getSnBind())) { if (!StringUtils.isEmpty(device.getSnBind())) {
throw new IotLicenseException(403, "sn已被绑定"); if (device.getSnBind().equals(snBind)) {
return true;
} else {
throw new IotLicenseException(403, "sn已被绑定");
}
} }
device.setSnBind(snBind); device.setSnBind(snBind);
device.setStatus(1); device.setStatus(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment