| | |
| | | if (pole == null) { |
| | | throw new BusinessException("灯杆不存在"); |
| | | } |
| | | pole.setClientId(clientId); |
| | | pole.setUserId(clientId); |
| | | if(!clientService.findClientId(clientId)){ |
| | | pole.setClientId(clientService.getClientId(clientId)); |
| | | } |
| | | r = updateById(pole); |
| | | |
| | | if (!r) { |
| | |
| | | } |
| | | |
| | | |
| | | public List<Pole> getOwnerPole(BaseConditionVO baseConditionVO, String keyword) { |
| | | public List<Pole> getOwnerPole(BaseConditionVO baseConditionVO, String keyword,Long cilentId) { |
| | | LambdaQueryWrapper<Pole> eq; |
| | | if(SecurityUtils.getClientId()!=null){ |
| | | // if(SecurityUtils.getClientId()!=null){ |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | if(clientService.findClientId()){ |
| | | eq = Wrappers.lambdaQuery(Pole.class).eq(Pole::getUserId, SecurityUtils.getUserId()); |
| | | if(clientService.findClientId(cilentId)){ |
| | | eq = Wrappers.lambdaQuery(Pole.class).eq(Pole::getUserId, cilentId); |
| | | }else{ |
| | | eq = Wrappers.lambdaQuery(Pole.class).eq(Pole::getClientId, SecurityUtils.getUserId()); |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | eq = Wrappers.lambdaQuery(Pole.class).eq(Pole::getClientId, cilentId) |
| | | .or( |
| | | pole->{ |
| | | pole.eq(Pole::getUserId, cilentId); |
| | | } |
| | | ); |
| | | } |
| | | |
| | | }else { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | eq = Wrappers.lambdaQuery(Pole.class); |
| | | } |
| | | // }else { |
| | | // PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | // eq = Wrappers.lambdaQuery(Pole.class); |
| | | // } |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | if (!keyword.isEmpty()){ |
| | | eq.like(Pole::getPoleName,keyword).or( |
| | | code->{ |