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

限制绑定接口

parent 42bb9085
......@@ -78,8 +78,12 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
Device device = deviceMapper.selectOne(queryWrapper);
if (device != null) {
if (!StringUtils.isEmpty(device.getSnBind())) {
if (device.getSnBind().equals(snBind)) {
return true;
} else {
throw new IotLicenseException(403, "sn已被绑定");
}
}
device.setSnBind(snBind);
device.setStatus(1);
device.setUpdateTime(new Date());
......
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