|
|
@ -68,6 +68,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
@ -256,12 +257,17 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
}else{ |
|
|
|
pids=staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId()); |
|
|
|
} |
|
|
|
LambdaQueryWrapper<VolunteerInfoEntity> query=new LambdaQueryWrapper<>(); |
|
|
|
query.eq(VolunteerInfoEntity::getCustomerId,customerId); |
|
|
|
query.likeRight(VolunteerInfoEntity::getPids,pids); |
|
|
|
query.select(VolunteerInfoEntity::getUserId); |
|
|
|
query.orderByAsc(VolunteerInfoEntity::getCreatedTime); |
|
|
|
Set<String> userIds = baseDao.selectObjs(query).stream().map(o->o.toString()).collect(Collectors.toSet()); |
|
|
|
List<OptionDTO> resultList = new ArrayList<>(); |
|
|
|
List<String> userIds = baseDao.selectVolunteerByPids(customerId,pids); |
|
|
|
if (CollectionUtils.isEmpty(userIds)) { |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIds); |
|
|
|
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIds)); |
|
|
|
if (userInfoRes.success() && CollectionUtils.isNotEmpty(userInfoRes.getData())) { |
|
|
|
Map<String, UserBaseInfoResultDTO> userMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, Function.identity())); |
|
|
|
for (String userId : userIds) { |
|
|
|