| | |
| | | import cn.hutool.core.stream.CollectorUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Lists; |
| | | import com.ruoyi.basic.mapper.CustomerFollowUpFileMapper; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | | import com.ruoyi.basic.service.CustomerFollowUpFileService; |
| | |
| | | .flatMap(s -> Arrays.stream(s.split(","))) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toSet()); |
| | | |
| | | List<CustomerFollowUpFile> followUpFilesByIds = customerFollowUpService.getFollowUpFilesByIds(ids); |
| | | List<CustomerFollowUpFile> followUpFilesByIds = new ArrayList<>(); |
| | | Lists.partition(Lists.newArrayList(ids), 999).forEach(it -> { |
| | | followUpFilesByIds.addAll( |
| | | customerFollowUpService.getFollowUpFilesByIds(it) |
| | | ); |
| | | }); |
| | | if (CollUtil.isEmpty(followUpFilesByIds)) { |
| | | return; |
| | | } |
| | |
| | | if (StrUtil.isNotBlank(attachmentIds)) { |
| | | List<SimpleFileVo> fileVos = Arrays.stream(attachmentIds.split(",")) |
| | | .map(Long::valueOf) |
| | | .map(it->collectMap.getOrDefault(it, (SimpleFileVo) Collections.emptyList())) |
| | | .map(it->collectMap.getOrDefault(it, null)) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | setAttachmentList.accept(t, fileVos); |
| | | } |