Commit ed29438d by jianan

龙虎榜本人数据重复

parent cb02fd50
......@@ -315,6 +315,14 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private void removeZero(PractitionerRankResponseVO responseVO) {
List<AclCustomerFortuneStatistics> rank = responseVO.getRank();
List<String> stringList = rank.stream().map(AclCustomerFortuneStatistics::getName)
.collect(Collectors.toList());
long count = stringList.stream().distinct().count();
if (stringList.size() != count) {
System.out.println("有重复元素");
// 有重复元素
rank.remove(rank.size() - 1);
}
// 过滤掉销售业绩是0的元素
List<AclCustomerFortuneStatistics> resultList = rank.stream()
.filter((AclCustomerFortuneStatistics i) -> !Integer.valueOf("0").equals(i.getCount()))
......
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