1
This commit is contained in:
@@ -429,11 +429,13 @@ public class JDUtils {
|
||||
|| orderRow.getValidCode() == 28
|
||||
|| orderRow.getValidCode() == 2).filter(orderRow -> orderRow.getSkuName() != null).collect(Collectors.groupingBy(OrderRow::getSkuName, Collectors.counting()));
|
||||
List<Map.Entry<String, Long>> sortedViolationCounts = skuIdViolationCountMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).limit(10).collect(Collectors.toList());
|
||||
.sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).collect(Collectors.toList());
|
||||
Integer num = 0;
|
||||
for (Map.Entry<String, Long> entry : sortedViolationCounts) {
|
||||
num ++;
|
||||
String skuName = entry.getKey();
|
||||
Long count = entry.getValue();
|
||||
content.append("商品:").append(skuName).append(" 违规次数:").append(count).append("\r");
|
||||
content.append(num + ",商品:").append(skuName).append(" 违规次数:").append(count).append("\r");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user