| | |
| | | one = getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getDeviceCode, deviceCode)); |
| | | } else { |
| | | one = getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getDeviceCode, deviceCode).eq(PoleBinding::getPoleId, poleId)); |
| | | |
| | | //删除灯杆的devicescode |
| | | PoleService poleService = SpringContextHolder.getBean(PoleService.class); |
| | | Pole pole = poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getId, poleId)); |
| | | if (pole != null) { |
| | | pole.setDeviceCode(null); |
| | | poleService.updateById(pole); |
| | | } |
| | | |
| | | |
| | | } |
| | | if (one != null) { |
| | | return removeById(one.getId()); |