2021与蓝度共同重构项目,服务端
fix
zhanzhiqin
2022-04-14 8fa5a6dd8045fb298e391498e2ef2cd904dade45
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleBindingService.java
@@ -35,7 +35,7 @@
//        }
        LambdaQueryWrapper<PoleBinding> eq = Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getPoleId, poleId);
        List<PoleBinding> list = list(eq);
        if (list.size() != 0){
        if (list.size() != 0) {
            for (PoleBinding poleBinding : list) {
                if (poleBinding.getDeviceType().equals(deviceType)) {
                    throw new BusinessException("该灯杆已绑定过相同类型设备");
@@ -52,7 +52,9 @@
            poleBinding.setDeviceCode(param.getDeviceCode());
            return save(poleBinding);
        } else {
            throw new BusinessException("该设备已绑定过");
            one.setPoleId(poleId);
            one.setDeviceType(param.getDeviceType());
            return updateById(one);
        }
    }