2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-28 9dd4f3549911f1253ccd9b934e8a5a90a7b2ce8c
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/XiXunController.java
@@ -394,17 +394,18 @@
    /**
     * 获取执行中的定时
     *
     * @param
     * @return
     */
    @GetMapping("/getPushSchedule")
    public ResponseVO<Object> getPushSchedule(@RequestBody List<Long> ids) {
        if(ids.isEmpty()){
        if (ids.isEmpty()) {
            throw new BusinessException("未选择LED屏");
        }
        List<LedScheduleVO> list = new ArrayList<>();
        for(Long id : ids) {
        for (Long id : ids) {
            LedScheduleVO ledScheduleVO = scheduleService.getledschedules(id);
            list.add(ledScheduleVO);
        }
@@ -417,7 +418,7 @@
     */
    @GetMapping("/closeWeatherPush/{id}")
    public ResponseVO<Object> closeWeatherPush(@PathVariable Long id) {
        if(id==null){
        if (id == null) {
            throw new BusinessException("未选择LED屏");
        }
        SpringContextHolder.getBean(PoleService.class).closeXiXunAirPush(id);
@@ -428,13 +429,13 @@
     * 清屏操作
     */
    @GetMapping("/clearScreen")
    public ResponseVO<Object> clearScreen(@RequestBody List<String> codes) {
        if(codes.isEmpty()){
    public ResponseVO<Object> clearScreen(@RequestBody List<Long> ids) {
        List<PoleLightemitEntity> list = poleLightemitService.listByIds(ids);
        if (ids.isEmpty() && list.isEmpty()) {
            throw new BusinessException("未选择LED屏");
        }
        for(String playerId : codes) {
            lightemitUtils.clear(playerId);
        for (PoleLightemitEntity playerId : list) {
            lightemitUtils.clear(playerId.getLightemitControlCode());
        }
        return ResponseUtil.success("清屏成功");
    }