From 96d4a01c8095064f6b0d1c8415317fd3bde3f6de Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 19 Nov 2020 10:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=BD=E7=AB=A0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/UserBadgeServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index ed07ea21a6..9cbb4e0e90 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -98,7 +98,9 @@ public class UserBadgeServiceImpl implements UserBadgeService { noOpenBadge.add(u); } }); - userBadgeListResultDTOS.addAll(noOpenBadge.stream().sorted(Comparator.comparing(UserBadgeListResultDTO::getSort)).collect(Collectors.toList())); + if (!CollectionUtils.isEmpty(noOpenBadge)){ + userBadgeListResultDTOS.addAll(noOpenBadge.stream().sorted(Comparator.comparing(UserBadgeListResultDTO::getSort)).collect(Collectors.toList())); + } return userBadgeListResultDTOS; }