| | |
| | | /** |
| | | * 删除节目 |
| | | * |
| | | * @param pid |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/deleteProgram/{pid}") |
| | | public ResponseVO<Object> deleteProgram(@PathVariable Long pid) { |
| | | @PostMapping("/deleteProgram") |
| | | public ResponseVO<Object> deleteProgram(@RequestBody List<Long> pids) { |
| | | if (!permissionConfig.check(MenuEnum.XIXUN_PROGRAM_DELETE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(xiXunPlayerService.deleteProgram(pid)); |
| | | return ResponseUtil.success(xiXunPlayerService.deleteProgram(pids)); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (!permissionConfig.check(MenuEnum.XIXUN_PROGRAM_PLAYING.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(xiXunPlayerService.getByPid(lightemitId)); |
| | | return ResponseUtil.success(poleLightemitService.getProgram(lightemitId)); |
| | | } |
| | | |
| | | |
| | |
| | | if (!permissionConfig.check(MenuEnum.XIXUN_PLAN_PUSH_SCHEDULE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | scheduleService.ledschedulepush(id, lightemitIds); |
| | | return ResponseUtil.success("设置成功"); |
| | | return ResponseUtil.success(scheduleService.ledschedulepush(id, lightemitIds)); |
| | | } |
| | | |
| | | /** |
| | | * 清空定时 |
| | | * |
| | | * @param |
| | | * @param lightemitIds |
| | | * @return |
| | | */ |
| | | @PostMapping("/deletePushSchedule") |
| | | public ResponseVO<Object> deletePushSchedule(@RequestBody Long[] lightemitIds) { |
| | | if (!permissionConfig.check(MenuEnum.XIXUN_PLAN_PUSH_SCHEDULE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | |
| | | return ResponseUtil.success(scheduleService.deleteSchedulePush(lightemitIds)); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 关闭天气推送 |
| | | */ |
| | | @GetMapping("/closeWeatherPush/{id}") |
| | | public ResponseVO<Object> closeWeatherPush(@PathVariable Long id) { |
| | | @GetMapping("/closeWeatherPush/{poleId}") |
| | | public ResponseVO<Object> closeWeatherPush(@PathVariable Long poleId) { |
| | | if (!permissionConfig.check(MenuEnum.XIXUN_CLOSE_AIR.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | if (id == null) { |
| | | throw new BusinessException("未选择LED屏"); |
| | | if (poleId == null) { |
| | | throw new BusinessException("灯杆id不能为空!"); |
| | | } |
| | | SpringContextHolder.getBean(PoleService.class).closeXiXunAirPush(id); |
| | | SpringContextHolder.getBean(PoleService.class).closeXiXunAirPush(poleId); |
| | | return ResponseUtil.success("关闭成功"); |
| | | } |
| | | |