瀏覽代碼

fix:会员管理为空判断

caoliqin 1 周之前
父節點
當前提交
89fffac440
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      fs-service-system/src/main/java/com/fs/store/service/impl/FsUserServiceImpl.java

+ 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) {