2021与蓝度共同重构项目,服务端
liuhaonan
2022-11-18 385b687cc1a0a8f6de2320af6b6e0d654cd658ed
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
@@ -62,12 +62,12 @@
        return ResponseUtil.success(poleService.updatePole(poleId, param));
    }
    @PostMapping("/delete/{poleId}")
    public ResponseVO<Object> deletePole(@PathVariable Long poleId) {
    @PostMapping("/delete")
    public ResponseVO<Object> deletePole(@RequestBody List<Long> poleIds) {
        if (!permissionConfig.check(MenuEnum.POLE_DELETE.getCode())) {
            return ResponseUtil.fail("缺少对应用户权限");
        }
        return ResponseUtil.success(poleService.deletePole(poleId));
        return ResponseUtil.success(poleService.deletePole(poleIds));
    }
    @PostMapping("/listDetail")
@@ -223,9 +223,9 @@
        if (!permissionConfig.check(MenuEnum.UNBIND.getCode())) {
            return ResponseUtil.fail("缺少对应用户权限");
        }
        boolean result = poleService.unBindPole(poleId, param.getDeviceCode());
        boolean result = poleService.unBindPole(poleId, param.getDeviceCode(), param.getDeviceType());
        if (result) {
            //设备类型,0路灯,1led屏幕,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助, 10熙讯, 11农耕
            //设备类型,0路灯,1led屏幕,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助, 10熙讯, 11农耕, 12新诺瓦
            switch (param.getDeviceType().toString()) {
                case PoleBindingEnums.LIGHT:
                    //删除灯杆的devicescode
@@ -257,6 +257,8 @@
                case PoleBindingEnums.XIXUN:
                    break;
                case PoleBindingEnums.ATMOSPHERIC_NONG_GENG:
                    break;
                case PoleBindingEnums.NEW_NOVA:
                    break;
                default:
                    break;
@@ -397,7 +399,7 @@
            throw new BusinessException("播放时间需大于零且小于86400000 !");
        }
        VnnoxResult vnnoxResult = poleService.pushAirDataToNova(param);
        if (vnnoxResult == null && vnnoxResult.getSuccess() != null && vnnoxResult.getSuccess().size() != 0) {
        if (vnnoxResult != null && vnnoxResult.getSuccess() != null && !vnnoxResult.getSuccess().isEmpty()) {
            return ResponseUtil.success("推送成功");
        } else {
            return ResponseUtil.fail("推送失败");