forked from dyf/fys-Multi-tenant
绑定优化
This commit is contained in:
@ -525,7 +525,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
throw new RuntimeException("设备已绑定");
|
||||
}
|
||||
UpdateWrapper<Device> deviceUpdateWrapper = new UpdateWrapper<>();
|
||||
deviceUpdateWrapper.eq("id", device.getId())
|
||||
deviceUpdateWrapper.eq("device_imei", deviceImei)
|
||||
.set("binding_status", BindingStatusEnum.BOUND.getCode())
|
||||
.set("binding_user_id", userId);
|
||||
;
|
||||
@ -544,7 +544,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
throw new RuntimeException("设备已绑定");
|
||||
}
|
||||
UpdateWrapper<Device> deviceUpdateWrapper = new UpdateWrapper<>();
|
||||
deviceUpdateWrapper.eq("id", device.getId())
|
||||
deviceUpdateWrapper.eq("device_mac", deviceMac)
|
||||
.set("binding_status", BindingStatusEnum.BOUND.getCode())
|
||||
.set("binding_user_id", userId);
|
||||
return baseMapper.update(null, deviceUpdateWrapper);
|
||||
|
Reference in New Issue
Block a user