| | |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.ximon.admin.entity.ProgramPro; |
| | | import com.sandu.ximon.admin.param.LEDScheduleParam_xixun; |
| | | import com.sandu.ximon.admin.param.SetBrightnessParam; |
| | | import com.sandu.ximon.admin.param.SetScreenOpenParam; |
| | | import com.sandu.ximon.admin.param.SetVolumeParam; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | |
| | | * @param lightemitIds |
| | | * @return |
| | | */ |
| | | @GetMapping("/pushToXixun/{pid}") |
| | | public ResponseVO<Object> getByPid(@PathVariable Long pid, @RequestBody List<Long> lightemitIds) { |
| | | @PostMapping("/pushToXixun/{pid}") |
| | | public ResponseVO<Object> pushByPid(@PathVariable Long pid, @RequestBody List<Long> lightemitIds) { |
| | | xiXunPlayerService.videoXixunPlayer(pid, lightemitIds); |
| | | return ResponseUtil.success("推送成功"); |
| | | } |
| | |
| | | /* |
| | | 设置音量 |
| | | */ |
| | | @PostMapping("/setBrightness") |
| | | public ResponseVO<Object> setBrightness(@RequestBody SetBrightnessParam setBrightnessParam) { |
| | | |
| | | if (setBrightnessParam == null || setBrightnessParam.getIds() == null || setBrightnessParam.getBrightness() > 255) { |
| | | throw new BusinessException("参数错误为空或亮度不能超过255"); |
| | | } |
| | | |
| | | Collection poleLightemitControllers = poleLightemitService.listByIds(Arrays.asList(setBrightnessParam.getIds())); |
| | | if (!poleLightemitControllers.isEmpty()) { |
| | | Iterator iterator = poleLightemitControllers.iterator(); |
| | | while (iterator.hasNext()) { |
| | | PoleLightemitEntity poleLightemitEntity = (PoleLightemitEntity) iterator.next(); |
| | | poleLightemitService.setBrightness(poleLightemitEntity.getLightemitControlCode(), setBrightnessParam.getBrightness()); |
| | | } |
| | | return ResponseUtil.success("设置亮度成功"); |
| | | } else { |
| | | throw new BusinessException("未选择LED屏"); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | 设置音量 |
| | | */ |
| | | @PostMapping("/setVolume") |
| | | public ResponseVO<Object> setVolume(@RequestBody SetVolumeParam setVolumeEntity) { |
| | | |
| | |
| | | return ResponseUtil.success(scheduleService.updateSchedule(ledEntity)); |
| | | } |
| | | |
| | | @PostMapping("/deleteSchedule") |
| | | public ResponseVO<Object> deleteSchedule(@RequestBody List<Integer> ids) { |
| | | return ResponseUtil.success(scheduleService.removeByIds(ids)); |
| | | } |
| | | |
| | | @GetMapping("/getSchedule/{id}") |
| | | public ResponseVO<Object> getSchedule(@PathVariable Integer id) { |
| | | return ResponseUtil.success(scheduleService.getSchedule(id)); |