| | |
| | | public ResponseVO<Object> update(@RequestBody ProgramPro programPro) { |
| | | PoleXixunPlayerEntity byId = xiXunPlayerService.getById(programPro.getProgramId()); |
| | | if (byId == null) { |
| | | throw new BusinessException("参数错误"); |
| | | throw new BusinessException("未选择LED屏"); |
| | | } |
| | | // QueryWrapper<PoleXixunPlayerEntity> queryWrapper = new QueryWrapper<>(); |
| | | // queryWrapper.eq("program_code", programPro.get_id()); |
| | |
| | | public ResponseVO<Object> setVolume(@RequestBody SetVolumeParam setVolumeEntity) { |
| | | |
| | | if (setVolumeEntity == null || setVolumeEntity.getIds() == null || setVolumeEntity.getVolume() > 15) { |
| | | throw new BusinessException("参数错误"); |
| | | throw new BusinessException("音量范围为0---15"); |
| | | } |
| | | |
| | | Collection poleLightemitControllers = poleLightemitService.listByIds(Arrays.asList(setVolumeEntity.getIds())); |
| | |
| | | return ResponseUtil.success(scheduleService.getSchedule(id)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/listSchedule") |
| | | public ResponseVO<Object> listSchedule(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | return ResponseUtil.success(scheduleService.listSchedule(baseConditionVO, keyword)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置定时 |
| | | * |
| | | * @param id |
| | | * @param lightemitIds |
| | | * @return |
| | | */ |
| | | @PostMapping("/pushSchedule/{id}") |
| | | public ResponseVO<Object> pushSchedule(@PathVariable Integer id, @RequestBody Long[] lightemitIds) { |
| | | scheduleService.ledschedulepush(id, lightemitIds); |