Commit 520f5bfe by guojx

活码推荐门店过滤上限门店代码重复删除

parent 533f0d61
......@@ -341,23 +341,6 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
log.info("省市区开启={}", selectStoreFlag);
retDTO.setStoreType(storeType);
//过滤门店活码达到上线的门店,获取标志位
List<HmQrcodeStoreDTO> hmStoreList = hmQrcodeApiService.getHmStoreByEnterpriseId(wxEnterpriseId , enterpriseId);
Map<String, Integer> map = new HashMap<>();
if (CollectionUtils.isNotEmpty(hmStoreList)) {
map = hmStoreList.stream()
.collect(Collectors.toMap(HmQrcodeStoreDTO::getStoreId, HmQrcodeStoreDTO::getOverFlag, (k1, k2) -> k1));
}
if (CollectionUtils.isNotEmpty(storeList)) {
Map<String, Integer> finalMap = map;
storeList = storeList.stream().filter(e -> {
Integer overFlag = finalMap.get(e.getStoreId());
if (overFlag != null && overFlag == 1) {
return false;
}
return true;
}).collect(Collectors.toList());
}
retDTO.setStoreList(storeList);
retDTO.setSelectStoreFlag(selectStoreFlag);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment