修复设备编辑无法清理收流IP的BUG

This commit is contained in:
648540858
2024-11-07 20:33:02 +08:00
parent 0b22f51be1
commit dbe4c80896
3 changed files with 12 additions and 54 deletions

View File

@@ -296,13 +296,10 @@ public class DeviceQuery {
@Parameter(name = "device", description = "设备", required = true)
@PostMapping("/device/update/")
public void updateDevice(Device device){
if (device != null && device.getDeviceId() != null) {
if (device.getSubscribeCycleForMobilePosition() > 0 && device.getMobilePositionSubmissionInterval() <= 0) {
device.setMobilePositionSubmissionInterval(5);
}
deviceService.updateCustomDevice(device);
if (device == null || device.getDeviceId() == null || device.getId() <= 0) {
throw new ControllerException(ErrorCode.ERROR400);
}
deviceService.updateCustomDevice(device);
}
/**