2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-11 7545924f23beb4db5f68a76f5f432d3bf2de523c
ximon-admin/src/main/java/com/sandu/ximon/admin/service/InterphoneSubService.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;
@@ -44,7 +45,7 @@
        }
        boolean belong = SpringContextHolder.getBean(PoleBindingService.class).isBelong(byId.getSubMac(), PoleBindingEnums.FOR_HELP);
        if (!belong) {
            throw new RuntimeException("该设备不属于您,不能修改设备信息");
            throw new BusinessException("该设备不属于您,不能修改设备信息");
        }
        InterphoneSub interphoneSub = new InterphoneSub();
        BeanUtils.copyProperties(interphoneSubParam, interphoneSub);
@@ -59,7 +60,7 @@
        InterphoneSub byId = getById(id);
        InterphoneHostSubPole one = interphoneHostSubService.getOne(Wrappers.lambdaQuery(InterphoneHostSubPole.class).eq(InterphoneHostSubPole::getSubId, id));
        if (one != null) {
            throw new RuntimeException("该子设备存在绑定关系,不能删除");
            throw new BusinessException("该子设备存在绑定关系,不能删除");
        }
        if (byId == null) {
            return false;