Преглед на файлове

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