|
|
@@ -367,15 +367,18 @@ public class SasDeviceServiceImpl extends AbstractCrudService<SasDeviceMapper, S
|
|
|
return;
|
|
|
}
|
|
|
String ipcId = device.getBindingIpc();
|
|
|
- device.setBindingIpc(null);
|
|
|
- device.setUpdateTime(LocalDateTime.now());
|
|
|
- this.updateById(device);
|
|
|
- SasDevice ipc = this.getById(ipcId);
|
|
|
- if (ipc != null) {
|
|
|
- ipc.setIsBinding(false);
|
|
|
- ipc.setUpdateTime(LocalDateTime.now());
|
|
|
- this.updateById(ipc);
|
|
|
- }
|
|
|
+ // 显式更新绑定关系,避免依赖通用 updateById 未更新 binding_ipc 的问题
|
|
|
+ this.lambdaUpdate()
|
|
|
+ .set(SasDevice::getBindingIpc, null)
|
|
|
+ .set(SasDevice::getUpdateTime, LocalDateTime.now())
|
|
|
+ .eq(SasDevice::getId, id)
|
|
|
+ .update();
|
|
|
+
|
|
|
+ this.lambdaUpdate()
|
|
|
+ .set(SasDevice::getIsBinding, false)
|
|
|
+ .set(SasDevice::getUpdateTime, LocalDateTime.now())
|
|
|
+ .eq(SasDevice::getId, ipcId)
|
|
|
+ .update();
|
|
|
}
|
|
|
|
|
|
@Override
|