Compare commits
2 Commits
1301b5d9ea
...
b821587935
Author | SHA1 | Date |
---|---|---|
tangqian | b821587935 | |
tangqian | 236d4b566b |
|
@ -181,14 +181,15 @@ public class PromoterServiceImpl implements PromoterService {
|
||||||
if (CollUtil.isEmpty(importUsers)) {
|
if (CollUtil.isEmpty(importUsers)) {
|
||||||
throw exception(PROMOTER_IMPORT_LIST_IS_EMPTY);
|
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());
|
Set<String> collect = importUsers.stream().map(PromoterImportExcelVO::getMobile).collect(Collectors.toSet());
|
||||||
List<MemberUserDO> list = memberUserService.getByMobileList(collect);
|
List<MemberUserDO> list = memberUserService.getByMobileList(collect);
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
List<String> collect1 = list.stream().map(MemberUserDO::getMobile).collect(Collectors.toList());
|
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();
|
List<DeptRespDTO> deptRespDTOList = deptApi.getDeptList();
|
||||||
Map<String, DeptRespDTO> nameList = deptRespDTOList.stream().collect(toMap(DeptRespDTO::getParentOrganizationName, value -> value, (value1, value2) -> value1));
|
Map<String, DeptRespDTO> nameList = deptRespDTOList.stream().collect(toMap(DeptRespDTO::getParentOrganizationName, value -> value, (value1, value2) -> value1));
|
||||||
importUsers.forEach(importUser -> {
|
importUsers.forEach(importUser -> {
|
||||||
|
|
Loading…
Reference in New Issue