2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-11 e14c003f6ff4e78740359828c39674507f134c45
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);