Commit 2f7f426c authored by 马33's avatar 马33

修改bug

parent 325bc153
......@@ -78,8 +78,12 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
wrapper.eq(Device::getSnBind, snBind).last("limit 1");
Device deviceTemp = deviceMapper.selectOne(wrapper);
if (deviceTemp != null) {
if (deviceTemp.getSn().equals(sn)) {
return true;
} else {
throw new IotLicenseException(403, "该设备已绑定了" + deviceTemp.getSn());
}
}
LambdaQueryWrapper<Device> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(Device::getSn, sn).last("limit 1");
Device device = deviceMapper.selectOne(queryWrapper);
......
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