CRM:code review 客户导入

This commit is contained in:
YunaiV
2024-02-23 18:50:22 +08:00
parent a64da48aa3
commit e53a0ca884
33 changed files with 277 additions and 217 deletions

View File

@ -257,11 +257,11 @@ public class CollectionUtils {
return !CollectionUtil.isEmpty(from) ? from.get(0) : null;
}
public static <T> T findFirst(List<T> from, Predicate<T> predicate) {
public static <T> T findFirst(Collection<T> from, Predicate<T> predicate) {
return findFirst(from, predicate, Function.identity());
}
public static <T, U> U findFirst(List<T> from, Predicate<T> predicate, Function<T, U> func) {
public static <T, U> U findFirst(Collection<T> from, Predicate<T> predicate, Function<T, U> func) {
if (CollUtil.isEmpty(from)) {
return null;
}