|
|
@ -51,6 +51,7 @@ import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
import com.epmet.service.HeartUserInfoService; |
|
|
|
import com.epmet.service.VolunteerInfoService; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.logging.log4j.LogManager; |
|
|
|
import org.apache.logging.log4j.Logger; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -228,7 +229,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<OptionDTO> queryListVolunteer(String customerId) { |
|
|
|
public List<OptionDTO> queryListVolunteer(String customerId, String userRealName) { |
|
|
|
List<OptionDTO> resultList = new ArrayList<>(); |
|
|
|
List<String> userIds = baseDao.selectVolunteerIds(customerId); |
|
|
|
if (CollectionUtils.isEmpty(userIds)) { |
|
|
@ -239,10 +240,19 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
Map<String, UserBaseInfoResultDTO> userMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, Function.identity())); |
|
|
|
for (String userId : userIds) { |
|
|
|
if (userMap.containsKey(userId)) { |
|
|
|
OptionDTO optionDTO = new OptionDTO(); |
|
|
|
optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); |
|
|
|
optionDTO.setValue(userId); |
|
|
|
resultList.add(optionDTO); |
|
|
|
if (StringUtils.isNoneBlank(userRealName)) { |
|
|
|
if (userMap.get(userId).getRealName().contains(userRealName)) { |
|
|
|
OptionDTO optionDTO = new OptionDTO(); |
|
|
|
optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); |
|
|
|
optionDTO.setValue(userId); |
|
|
|
resultList.add(optionDTO); |
|
|
|
} |
|
|
|
} else { |
|
|
|
OptionDTO optionDTO = new OptionDTO(); |
|
|
|
optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); |
|
|
|
optionDTO.setValue(userId); |
|
|
|
resultList.add(optionDTO); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|