| | |
| | | |
| | | 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; |
| | |
| | | } |
| | | 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); |
| | |
| | | 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; |