fix: 使用convertSetByFlatMap避免 ID 重复

Signed-off-by: dhb52 <dhb52@126.com>
This commit is contained in:
dhb52 2024-03-05 15:08:40 +00:00 committed by Gitee
parent 1f35ef59d1
commit 06c0d86544
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -137,7 +137,7 @@ public class CrmCustomerController {
return java.util.Collections.emptyList();
}
// 1.1 获取创建人负责人列表
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertListByFlatMap(list,
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertSetByFlatMap(list,
contact -> Stream.of(NumberUtils.parseLong(contact.getCreator()), contact.getOwnerUserId())));
Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
// 1.2 获取距离进入公海的时间