Compare commits

...

2 Commits

Author SHA1 Message Date
tangqian b821587935 Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product 2023-06-01 12:02:51 +08:00
tangqian 236d4b566b fix: 修改部门 2023-06-01 12:02:45 +08:00
1 changed files with 4 additions and 3 deletions

View File

@ -181,14 +181,15 @@ public class PromoterServiceImpl implements PromoterService {
if (CollUtil.isEmpty(importUsers)) {
throw exception(PROMOTER_IMPORT_LIST_IS_EMPTY);
}
PromoterImportRespVO respVO = PromoterImportRespVO.builder().createUsernames(new ArrayList<>())
.updateUsernames(new ArrayList<>()).failureUsernames(new LinkedHashMap<>()).build();
Set<String> collect = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toSet());
List<MemberUserDO> list = memberUserService.getByMobileList(collect);
if (!CollectionUtils.isEmpty(list)) {
List<String> collect1 = list.stream().map(MemberUserDO::getMobile).collect(Collectors.toList());
throw new ServiceException(200, "电话号码:" + collect1 + "重复");
respVO.getFailureUsernames().put("电话号码:" + collect1, "重复");
}
PromoterImportRespVO respVO = PromoterImportRespVO.builder().createUsernames(new ArrayList<>())
.updateUsernames(new ArrayList<>()).failureUsernames(new LinkedHashMap<>()).build();
List<DeptRespDTO> deptRespDTOList = deptApi.getDeptList();
Map<String, DeptRespDTO> nameList = deptRespDTOList.stream().collect(toMap(DeptRespDTO::getParentOrganizationName, value -> value, (value1, value2) -> value1));
importUsers.forEach(importUser -> {