| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 摄像头 |
| | | */ |
| | |
| | | //返回查询的摄像头信息列表 |
| | | CommonPage commonPage; |
| | | if (monitorParam == null) { |
| | | commonPage = monitorService.listMonitorByKeyword(baseConditionVO,order,seq, new MonitorParam()); |
| | | commonPage = monitorService.listMonitorByKeyword(baseConditionVO, order, seq, new MonitorParam()); |
| | | } else { |
| | | commonPage = monitorService.listMonitorByKeyword(baseConditionVO,order,seq, monitorParam); |
| | | commonPage = monitorService.listMonitorByKeyword(baseConditionVO, order, seq, monitorParam); |
| | | } |
| | | |
| | | return ResponseUtil.success(commonPage); |
| | |
| | | /** |
| | | * 删除数据库中萤石云摄像头 |
| | | * |
| | | * @param id |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/delete/{id}") |
| | | public ResponseVO<Object> deleteMonitor(@PathVariable Long id) { |
| | | @PostMapping("/delete") |
| | | public ResponseVO<Object> deleteMonitor(@RequestBody List<Long> ids) { |
| | | if (!permissionConfig.check(MenuEnum.MONITOR_DELETE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | boolean result = monitorService.deleteMonitor(id); |
| | | boolean result = monitorService.deleteMonitor(ids); |
| | | if (result) { |
| | | return ResponseUtil.success(null); |
| | | } else { |