2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-11 ebecb50ecf3c53428fac4f3bd09d98110d6bc8d7
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
@@ -75,6 +75,13 @@
        if (pole == null) {
            throw new BusinessException("未找到该灯杆");
        }
        Long clientId = SecurityUtils.getClientId();
        //非超管
        if (clientId != null) {
            if (!Objects.equals(SecurityUtils.getUserId(), pole.getUserId()) && !Objects.equals(SecurityUtils.getUserId(), pole.getClientId())) {
                throw new BusinessException("该灯杆不属于您");
            }
        }
        Pole update = new Pole();
        BeanUtils.copyProperties(param, update);
        update.setId(poleId);