|
@@ -194,22 +194,34 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
|
|
if (s.getType() == RoleTypeEnum.BUSSINESS) {
|
|
if (s.getType() == RoleTypeEnum.BUSSINESS) {
|
|
List<TBService> tbServiceList = tbServiceService.listByIds(Arrays.asList(serviceId));
|
|
List<TBService> tbServiceList = tbServiceService.listByIds(Arrays.asList(serviceId));
|
|
if (!CollectionUtils.isEmpty(tbServiceList)) {
|
|
if (!CollectionUtils.isEmpty(tbServiceList)) {
|
|
- tbServiceList = tbServiceList.stream().filter(i -> Objects.nonNull(i.getServiceLeadId()) ? true : false).collect(Collectors.toList());
|
|
|
|
- List<String> serviceLeadIdList = tbServiceList.stream().map(i -> String.valueOf(i.getServiceLeadId())).collect(Collectors.toList());
|
|
|
|
|
|
+ List<String> serviceLeadIdList = new ArrayList<>();
|
|
|
|
+ for (TBService t : tbServiceList) {
|
|
|
|
+ if (Objects.nonNull(t.getServiceLeadId())) {
|
|
|
|
+ serviceLeadIdList.add(String.valueOf(t.getServiceLeadId()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
userIdList.addAll(serviceLeadIdList);
|
|
userIdList.addAll(serviceLeadIdList);
|
|
}
|
|
}
|
|
} else if (s.getType() == RoleTypeEnum.REGION_MANAGER) {
|
|
} else if (s.getType() == RoleTypeEnum.REGION_MANAGER) {
|
|
List<TBCrm> tbCrmList = tbCrmService.list(new QueryWrapper<TBCrm>().lambda().eq(TBCrm::getServiceId, serviceId));
|
|
List<TBCrm> tbCrmList = tbCrmService.list(new QueryWrapper<TBCrm>().lambda().eq(TBCrm::getServiceId, serviceId));
|
|
if (!CollectionUtils.isEmpty(tbCrmList)) {
|
|
if (!CollectionUtils.isEmpty(tbCrmList)) {
|
|
- tbCrmList = tbCrmList.stream().filter(i -> Objects.nonNull(i.getLeadId()) ? true : false).collect(Collectors.toList());
|
|
|
|
- List<String> leadIdList = tbCrmList.stream().map(i -> String.valueOf(i.getLeadId())).collect(Collectors.toList());
|
|
|
|
|
|
+ List<String> leadIdList = new ArrayList<>();
|
|
|
|
+ for (TBCrm t : tbCrmList) {
|
|
|
|
+ if (Objects.nonNull(t.getLeadId())) {
|
|
|
|
+ leadIdList.add(String.valueOf(t.getLeadId()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
userIdList.addAll(leadIdList);
|
|
userIdList.addAll(leadIdList);
|
|
}
|
|
}
|
|
} else if (s.getType() == RoleTypeEnum.REGION_COORDINATOR) {
|
|
} else if (s.getType() == RoleTypeEnum.REGION_COORDINATOR) {
|
|
List<TBCrm> tbCrmList = tbCrmService.list(new QueryWrapper<TBCrm>().lambda().eq(TBCrm::getServiceId, serviceId));
|
|
List<TBCrm> tbCrmList = tbCrmService.list(new QueryWrapper<TBCrm>().lambda().eq(TBCrm::getServiceId, serviceId));
|
|
if (!CollectionUtils.isEmpty(tbCrmList)) {
|
|
if (!CollectionUtils.isEmpty(tbCrmList)) {
|
|
- tbCrmList = tbCrmList.stream().filter(i -> Objects.nonNull(i.getRegionCoordinatorId()) ? true : false).collect(Collectors.toList());
|
|
|
|
- List<String> regionCoordinatorIdList = tbCrmList.stream().map(i -> String.valueOf(i.getRegionCoordinatorId())).collect(Collectors.toList());
|
|
|
|
|
|
+ List<String> regionCoordinatorIdList = new ArrayList<>();
|
|
|
|
+ for (TBCrm t : tbCrmList) {
|
|
|
|
+ if (Objects.nonNull(t.getRegionCoordinatorId())) {
|
|
|
|
+ regionCoordinatorIdList.add(String.valueOf(t.getRegionCoordinatorId()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
userIdList.addAll(regionCoordinatorIdList);
|
|
userIdList.addAll(regionCoordinatorIdList);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|