| | |
| | | BeanUtils.copyProperties(customer, dto); |
| | | |
| | | // 查询跟进记录 |
| | | List<CustomerFollowUp> followUpList = customerFollowUpService.list( |
| | | new LambdaQueryWrapper<CustomerFollowUp>() |
| | | .eq(CustomerFollowUp::getCustomerId, id) |
| | | .orderByDesc(CustomerFollowUp::getFollowUpTime) |
| | | ); |
| | | |
| | | if (!CollectionUtils.isEmpty(followUpList)) { |
| | | List<CustomerFollowUpDto> followUpDtoList = followUpList.stream().map(followUp -> { |
| | | CustomerFollowUpDto followUpDto = new CustomerFollowUpDto(); |
| | | BeanUtils.copyProperties(followUp, followUpDto); |
| | | |
| | | // 查询附件 |
| | | List<CustomerFollowUpFile> fileList = customerFollowUpFileService.list( |
| | | new LambdaQueryWrapper<CustomerFollowUpFile>() |
| | | .eq(CustomerFollowUpFile::getFollowUpId, followUp.getId()) |
| | | ); |
| | | followUpDto.setFileList(fileList); |
| | | |
| | | return followUpDto; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | dto.setFollowUpList(followUpDtoList); |
| | | } |
| | | // List<CustomerFollowUp> followUpList = customerFollowUpService.list( |
| | | // new LambdaQueryWrapper<CustomerFollowUp>() |
| | | // .eq(CustomerFollowUp::getCustomerId, id) |
| | | // .orderByDesc(CustomerFollowUp::getFollowUpTime) |
| | | // ); |
| | | // |
| | | // if (!CollectionUtils.isEmpty(followUpList)) { |
| | | // List<CustomerFollowUpDto> followUpDtoList = followUpList.stream().map(followUp -> { |
| | | // CustomerFollowUpDto followUpDto = new CustomerFollowUpDto(); |
| | | // BeanUtils.copyProperties(followUp, followUpDto); |
| | | // |
| | | // // 查询附件 |
| | | // List<CustomerFollowUpFile> fileList = customerFollowUpFileService.list( |
| | | // new LambdaQueryWrapper<CustomerFollowUpFile>() |
| | | // .eq(CustomerFollowUpFile::getFollowUpId, followUp.getId()) |
| | | // ); |
| | | // followUpDto.setFileList(fileList); |
| | | // |
| | | // return followUpDto; |
| | | // }).collect(Collectors.toList()); |
| | | // |
| | | // dto.setFollowUpList(followUpDtoList); |
| | | // } |
| | | // 地区名称 |
| | | CustomerRegions customerRegions = customerRegionsService.getById(customer.getRegionsId()); |
| | | dto.setRegionsName(customerRegions.getRegionsName()); |
| | | if (customerRegions != null) { |
| | | dto.setRegionsName(customerRegions.getRegionsName()); |
| | | } |
| | | return dto; |
| | | } |
| | | |