2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-11 7545924f23beb4db5f68a76f5f432d3bf2de523c
ximon-admin/src/main/java/com/sandu/ximon/admin/service/InterphoneHostService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.pagehelper.PageHelper;
import com.sandu.common.execption.BusinessException;
import com.sandu.common.object.BaseConditionVO;
import com.sandu.common.service.impl.BaseServiceImpl;
import com.sandu.common.util.SpringContextHolder;
@@ -47,7 +48,7 @@
        boolean belong = SpringContextHolder.getBean(PoleBindingService.class).isBelong(byId.getHostMac(), PoleBindingEnums.FOR_HELP);
        if (!belong) {
            throw new RuntimeException("该设备不属于您,不能修改设备信息");
            throw new BusinessException("该设备不属于您,不能修改设备信息");
        }
        InterphoneHost interphoneHost = new InterphoneHost();
        interphoneHost.setHostId(id);
@@ -66,7 +67,7 @@
        InterphoneHostSubPole one = interphoneHostSubService.getOne(Wrappers.lambdaQuery(InterphoneHostSubPole.class).eq(InterphoneHostSubPole::getHostId, id));
        if (one != null) {
            throw new RuntimeException("该主机存在绑定关系,不能删除");
            throw new BusinessException("该主机存在绑定关系,不能删除");
        }
        if (byId == null) {
            return false;