营销活动:完成砍价、秒杀库存回滚。完成拼团过期和虚拟成团处理

This commit is contained in:
puhui999
2023-10-10 15:30:58 +08:00
parent fdbebc406c
commit bccd270fc7
6 changed files with 223 additions and 24 deletions

View File

@ -64,6 +64,13 @@ public class CollectionUtils {
return from.stream().filter(filter).map(func).filter(Objects::nonNull).collect(Collectors.toList());
}
public static <K, V> List<V> mergeValuesFromMap(Map<K, List<V>> map) {
return map.values()
.stream()
.flatMap(List::stream)
.collect(Collectors.toList());
}
public static <T, U> Set<U> convertSet(Collection<T> from, Function<T, U> func) {
if (CollUtil.isEmpty(from)) {
return new HashSet<>();