Sfoglia il codice sorgente

fix:会员管理为空判断

caoliqin 1 settimana fa
parent
commit
89fffac440

+ 4 - 1
fs-service-system/src/main/java/com/fs/store/service/impl/FsUserServiceImpl.java

@@ -542,7 +542,10 @@ public class FsUserServiceImpl implements IFsUserService
         Map<Long, CompanyTag> tagMap = companyTagCacheService.queryAllTagMap();
         //获取会员的最新的看课状态和最后看课时间
         Set<Long> userIds = fsUserPageListVOS.stream().map(FsUserPageListVO::getUserId).collect(Collectors.toSet());
-        List<FsUserLastCount> fsUserCourseCounts = fsUserCourseCountMapper.selectUserLastCount(userIds);
+        List<FsUserLastCount> fsUserCourseCounts = Collections.emptyList();
+        if(!userIds.isEmpty()){
+            fsUserCourseCounts = fsUserCourseCountMapper.selectUserLastCount(userIds);
+        }
         Map<Long, FsUserLastCount> countMap = fsUserCourseCounts.stream().collect(Collectors.toMap(FsUserLastCount::getUserId, Function.identity()));
 
         for (FsUserPageListVO item : fsUserPageListVOS) {