2021与蓝度共同重构项目,服务端
liuhaonan
2022-09-14 c3e734b8a5370f3d4b0102a86721a98adb8e3476
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
@@ -717,7 +717,7 @@
                throw new BusinessException("灯杆不存在");
            }
            pole.setClientId(clientId);
            if (!clientService.findClientId(clientId)) {
            if (clientService.findClientId(clientId)) {
                pole.setUserId(clientService.getClientId(clientId));
            }
@@ -731,6 +731,31 @@
        return r;
    }
    /**
     * 用户解绑灯杆
     *
     * @param clientId
     * @param poleIds
     * @return
     */
    public boolean ClientUnBindingPole(long clientId, int[] poleIds) {
        boolean r = false;
        for (int poleId : poleIds) {
            Pole pole = getById(poleId);
            if (pole == null) {
                throw new BusinessException("灯杆不存在");
            }
            pole.setClientId(-1L);
            r = updateById(pole);
            if (!r) {
                throw new BusinessException("灯杆ID为" + poleId + "设置失败,自动停止");
            }
        }
        return r;
    }
    public List<Pole> getOwnerPole(BaseConditionVO baseConditionVO, String keyword, Long cilentId) {
        LambdaQueryWrapper<Pole> eq;