| | |
| | | return ResponseUtil.success(URL); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改备注 |
| | | * |
| | | * @param monitorParam |
| | | * @return |
| | | */ |
| | | @PostMapping("/updateNotes") |
| | | public ResponseVO<Object> updateNotes(@RequestBody MonitorParam monitorParam) { |
| | | boolean flag = monitorService.updateNotes(monitorParam.getDeviceSerial(), monitorParam.getNotes()); |
| | | if (flag) { |
| | | return ResponseUtil.success("修改备注成功!"); |
| | | } else { |
| | | return ResponseUtil.fail("修改备注失败!"); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * 结束萤石云摄像头播放地址相关参数 |
| | | */ |
| | | |
| | | /** |
| | | * 修改备注 |
| | | */ |
| | | private String notes; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改note |
| | | * |
| | | * @param deviceSerial |
| | | * @param notes |
| | | * @return |
| | | */ |
| | | public boolean updateNotes(String deviceSerial, String notes) { |
| | | if (deviceSerial == null || deviceSerial.trim().length() == 0 || notes == null) { |
| | | throw new BusinessException("修改备注参数有误!"); |
| | | } |
| | | Monitor one = getOne(Wrappers.lambdaQuery(Monitor.class).eq(Monitor::getDeviceSerial, deviceSerial)); |
| | | if (one != null) { |
| | | one.setNote(notes); |
| | | return updateById(one); |
| | | } else { |
| | | throw new BusinessException("摄像头设备不存在!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |