|
@@ -23,11 +23,12 @@ import com.fs.store.service.cache.IFsUserCacheService;
|
|
|
import com.fs.store.service.cache.IFsUserCourseCacheService;
|
|
|
import com.hc.openapi.tool.util.StringUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 答题日志Service业务层处理
|
|
@@ -50,6 +51,9 @@ public class FsCourseAnswerLogsServiceImpl implements IFsCourseAnswerLogsService
|
|
|
private final ICompanyCacheService companyCacheService;
|
|
|
|
|
|
private final ICompanyUserCacheService companyUserCacheService;
|
|
|
+
|
|
|
+ private final IFsUserService fsUserService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询答题日志
|
|
|
*
|
|
@@ -86,6 +90,16 @@ public class FsCourseAnswerLogsServiceImpl implements IFsCourseAnswerLogsService
|
|
|
|
|
|
@Override
|
|
|
public List<FsCourseAnswerLogsListVO> selectFsCourseAnswerLogsListVONew(FsCourseAnswerLogsParam param) {
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(param.getUserName())){
|
|
|
+ List<FsUser> fsUsers = fsUserService.selectFsUserListByJointUserNameKey(param.getUserName());
|
|
|
+ if(fsUsers.isEmpty()) {
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
+ Set<Long> userIds = fsUsers.stream().map(FsUser::getUserId).collect(Collectors.toSet());
|
|
|
+ param.setUserIds(userIds);
|
|
|
+ }
|
|
|
+
|
|
|
List<FsCourseAnswerLogsListVO> data = fsCourseAnswerLogsMapper.selectFsCourseAnswerLogsListVONew(param);
|
|
|
for (FsCourseAnswerLogsListVO datum : data) {
|
|
|
FsUserCourseVideo fsUserCourseVideo = fsUserCourseVideoCacheService.selectFsUserCourseVideoByVideoId(datum.getVideoId());
|