2021与蓝度共同重构项目,服务端
fix
zhanzhiqin
2022-04-22 8a5b6b092754685b4da940d2a35a855832f92465
fix
已修改1个文件
10 ■■■■■ 文件已修改
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleBindingService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleBindingService.java
@@ -87,6 +87,16 @@
            one = getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getDeviceCode, deviceCode));
        } else {
            one = getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getDeviceCode, deviceCode).eq(PoleBinding::getPoleId, poleId));
            //删除灯杆的devicescode
            PoleService poleService = SpringContextHolder.getBean(PoleService.class);
            Pole pole = poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getId, poleId));
            if (pole != null) {
                pole.setDeviceCode(null);
                poleService.updateById(pole);
            }
        }
        if (one != null) {
            return removeById(one.getId());