| | |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | LambdaQueryWrapper<Client> wrapper = Wrappers.lambdaQuery(Client.class); |
| | | if (AdministratorEnums.CUSTOMER.getCode().equals(SecurityUtils.getAdministratorIdentity())) { |
| | | wrapper.eq(Client::getSuperiorId, SecurityUtils.getUserId()); |
| | | if (AdministratorEnums.NORMAL.getCode().equals(SecurityUtils.getAdministratorIdentity())) { |
| | | wrapper.eq(Client::getSuperiorId, SecurityUtils.getUserId()).or(w -> w.eq( |
| | | Client::getId, SecurityUtils.getUserId() |
| | | )); |
| | | } |
| | | if (keyword != null && !keyword.isEmpty()) { |
| | | wrapper.like(Client::getClientName, keyword) |
| | | .or(clientLambdaQueryWrapper -> clientLambdaQueryWrapper.like(Client::getMobile, keyword)) |
| | | .or(clientLambdaQueryWrapper -> clientLambdaQueryWrapper.like(Client::getLinkMan, keyword)); |
| | | .or(w1 -> w1.like(Client::getMobile, keyword)) |
| | | .or(w2 -> w2.like(Client::getLinkMan, keyword)); |
| | | } |
| | | List<Client> clientList = clientService.list(wrapper); |
| | | List<ClientDto> clientDtoList = new ArrayList<>(); |