Commit 2eb4ac13 authored by ma's avatar ma

解绑授权SN置为NULL

parent 799fad48
...@@ -119,7 +119,9 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme ...@@ -119,7 +119,9 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
queryWrapper.eq(Device::getSnBind, snBind).last("limit 1"); queryWrapper.eq(Device::getSnBind, snBind).last("limit 1");
Device device = deviceMapper.selectOne(queryWrapper); Device device = deviceMapper.selectOne(queryWrapper);
if (device != null) { if (device != null) {
device.setSn(CommonUtil.genRandomNum(18)); if (snBind.equals(device.getSn())) {
device.setSn(null);
}
device.setSnBind(null); device.setSnBind(null);
device.setStatus(0); device.setStatus(0);
device.setUpdateTime(new Date()); 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