2021与蓝度共同重构项目,服务端
liuhaonan
2022-09-07 20e4636014540c4c27b0d2d337927eed8593d93a
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/XiXunController.java
@@ -488,15 +488,15 @@
    /**
     * 关闭天气推送
     */
    @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("关闭成功");
    }