| | |
| | | return r; |
| | | } |
| | | |
| | | /** |
| | | * 用户解绑灯杆 |
| | | * |
| | | * @param clientId |
| | | * @param poleIds |
| | | * @return |
| | | */ |
| | | public boolean ClientUnBindingPole(long clientId, int[] poleIds) { |
| | | boolean r = false; |
| | | for (int poleId : poleIds) { |
| | | Pole pole = getById(poleId); |
| | | if (pole == null) { |
| | | throw new BusinessException("灯杆不存在"); |
| | | } |
| | | pole.setUserId(-1L); |
| | | pole.setClientId(-1L); |
| | | r = updateById(pole); |
| | | |
| | | if (!r) { |
| | | throw new BusinessException("灯杆ID为" + poleId + "设置失败,自动停止"); |
| | | } |
| | | |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | |
| | | public List<Pole> getOwnerPole(BaseConditionVO baseConditionVO, String keyword, Long cilentId) { |
| | | LambdaQueryWrapper<Pole> eq; |