1
This commit is contained in:
@@ -425,7 +425,7 @@ public class JDUtils {
|
||||
// 计算出skuId 违规的前7个排行
|
||||
Map<Long, Long> skuIdViolationCountMap = oneYearOrders.stream().filter(orderRow -> orderRow.getValidCode() == 27
|
||||
|| orderRow.getValidCode() == 28
|
||||
|| orderRow.getValidCode() == 2).collect(Collectors.groupingBy(OrderRow::getSkuId, Collectors.counting()));
|
||||
|| orderRow.getValidCode() == 2).filter(orderRow -> orderRow.getSkuId() != null).collect(Collectors.groupingBy(OrderRow::getSkuId, Collectors.counting()));
|
||||
List<Map.Entry<Long, Long>> sortedViolationCounts = skuIdViolationCountMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).limit(7).collect(Collectors.toList());
|
||||
for (Map.Entry<Long, Long> entry : sortedViolationCounts) {
|
||||
|
||||
Reference in New Issue
Block a user