|
|
@@ -90,22 +90,24 @@ public class SysCustomerDataPrivateService {
|
|
|
if (dto.getGroupId() != null) {
|
|
|
groupIds.add(dto.getGroupId());
|
|
|
}
|
|
|
- List<Long> cityIds = sysCustomerUserCommonService.queryUserCityIds(dto.getProvinceId());
|
|
|
- List<BindUserBO> bindUserBOS = sysCustomerUserCommonService.queryBindUserListByCityId(cityIds);
|
|
|
- if (CollUtil.isNotEmpty(bindUserBOS)) {
|
|
|
- if (CollUtil.isEmpty(userIds)) {
|
|
|
- userIds.addAll(
|
|
|
- bindUserBOS.stream()
|
|
|
- .map(BindUserBO::getId).toList());
|
|
|
- }
|
|
|
+ List<Long> cityIds = Lists.newArrayList();
|
|
|
+ if (dto.getProvinceId() != null) {
|
|
|
+ cityIds.addAll(sysCustomerUserCommonService.queryUserCityIds(dto.getProvinceId()));
|
|
|
+ List<BindUserBO> bindUserBOS = sysCustomerUserCommonService.queryBindUserListByCityId(cityIds);
|
|
|
+ if (CollUtil.isNotEmpty(bindUserBOS)) {
|
|
|
+ if (CollUtil.isEmpty(userIds)) {
|
|
|
+ userIds.addAll(
|
|
|
+ bindUserBOS.stream()
|
|
|
+ .map(BindUserBO::getId).toList());
|
|
|
+ }
|
|
|
|
|
|
- if (CollUtil.isEmpty(groupIds)) {
|
|
|
- groupIds.addAll(
|
|
|
- bindUserBOS.stream()
|
|
|
- .map(BindUserBO::getGroupId).distinct().toList());
|
|
|
+ if (CollUtil.isEmpty(groupIds)) {
|
|
|
+ groupIds.addAll(
|
|
|
+ bindUserBOS.stream()
|
|
|
+ .map(BindUserBO::getGroupId).distinct().toList());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
if (CollUtil.isEmpty(userIds) || CollUtil.isEmpty(groupIds)) {
|
|
|
return new PageResult<SysCustomerDataPrivateBO>()
|
|
|
.setCurrent(1)
|
|
|
@@ -133,7 +135,7 @@ public class SysCustomerDataPrivateService {
|
|
|
// 城市id(不为空时)
|
|
|
.eq(Objects.nonNull(dto.getCityId()), SysCustomerDataEntity::getCityId, dto.getCityId())
|
|
|
// 城市id(为空时)
|
|
|
- .in(Objects.isNull(dto.getCityId()), SysCustomerDataEntity::getCityId, cityIds)
|
|
|
+ .in(Objects.isNull(dto.getCityId())&&CollUtil.isNotEmpty(cityIds), SysCustomerDataEntity::getCityId, cityIds)
|
|
|
.in(SysCustomerDataEntity::getClaimUserGroupId, groupIds)
|
|
|
//必须是已认领的,不认领的是不能出现在我的客户里面的,所有必须加这个过滤,不管是存量还是首单客户都要加这个参数
|
|
|
.eq(SysCustomerDataEntity::getClaimStatus, 1)
|