|
@ -49,6 +49,7 @@ import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
@ -190,23 +191,10 @@ public class GridLatestServiceImpl extends BaseServiceImpl<GridLatestDao, GridLa |
|
|
**/ |
|
|
**/ |
|
|
@Override |
|
|
@Override |
|
|
public List<CustomerUser4PointResultDTO> getCustomerUsers(CustomerUserFormDTO customerUserFormDTO) { |
|
|
public List<CustomerUser4PointResultDTO> getCustomerUsers(CustomerUserFormDTO customerUserFormDTO) { |
|
|
List<CustomerUser4PointResultDTO> allData = new LinkedList<>(); |
|
|
|
|
|
List<String> userIds = baseDao.selectAllUserByCustomerId(customerUserFormDTO.getCustomerId()); |
|
|
|
|
|
if(null == userIds) userIds = new LinkedList<>(); |
|
|
|
|
|
CommonCustomerFormDTO customerParam = new CommonCustomerFormDTO(); |
|
|
|
|
|
customerParam.setCustomerId(customerUserFormDTO.getCustomerId()); |
|
|
|
|
|
Result<List<String>> volunteer = epmetHeartOpenFeignClient.volunteerUserIds(customerParam); |
|
|
|
|
|
if(volunteer.success() && null != volunteer.getData() && !volunteer.getData().isEmpty()){ |
|
|
|
|
|
userIds.addAll(volunteer.getData()); |
|
|
|
|
|
userIds = userIds.stream().distinct().collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
if(null == userIds || userIds.isEmpty()){ |
|
|
|
|
|
return allData; |
|
|
|
|
|
} |
|
|
|
|
|
PageHelper.startPage(customerUserFormDTO.getPageNo(),customerUserFormDTO.getPageSize()); |
|
|
PageHelper.startPage(customerUserFormDTO.getPageNo(),customerUserFormDTO.getPageSize()); |
|
|
allData = userWechatDao.selectResiAndStrangerInfo(userIds,customerUserFormDTO.getName()); |
|
|
List<CustomerUser4PointResultDTO> allData = userWechatDao.selectResiAndStrangerInfo(customerUserFormDTO.getCustomerId(),customerUserFormDTO.getName()); |
|
|
if(null == allData || allData.isEmpty()){ |
|
|
if (!CollectionUtils.isEmpty(allData)){ |
|
|
return allData; |
|
|
return new ArrayList<>(); |
|
|
} |
|
|
} |
|
|
allData.forEach(info -> { |
|
|
allData.forEach(info -> { |
|
|
if(StringUtils.isNotBlank(info.getUserId())){ |
|
|
if(StringUtils.isNotBlank(info.getUserId())){ |
|
|