|
@@ -50,6 +50,7 @@ import com.zhongzheng.modules.user.mapper.UserStudyRecordMapper;
|
|
|
import com.zhongzheng.modules.user.service.*;
|
|
|
import com.zhongzheng.modules.user.vo.*;
|
|
|
import net.polyv.live.v1.entity.channel.operate.LiveChannelBasicInfoResponse;
|
|
|
+import net.polyv.live.v1.entity.channel.viewdata.LiveListChannelViewlogResponse;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -59,7 +60,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.security.NoSuchAlgorithmException;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -105,13 +108,15 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
@Autowired
|
|
|
private ICourseChapterSectionService iCourseChapterSectionService;
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
private com.zhongzheng.modules.alisms.service.IAliSmsService IAliSmsService;
|
|
|
|
|
|
@Autowired
|
|
|
private IUserService iUserService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IPolyvLiveService iPolyvLiveService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private IInformUserService iInformUserService;
|
|
|
|
|
@@ -126,8 +131,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
private IUserBankRecordService iUserBankRecordService;
|
|
|
@Autowired
|
|
|
private IUserExamGoodsService iUserExamGoodsService;
|
|
|
- @Autowired
|
|
|
- private IPolyvLiveService iPolyvLiveService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
@Override
|
|
@@ -540,6 +544,18 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
return this.baseMapper.userSectionLiveList(bo);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<LiveListChannelViewlogResponse.LiveChannelViewlog> userSectionLiveLog(UserStudyRecordQueryBo bo) throws IOException, NoSuchAlgorithmException {
|
|
|
+ UserVo user = iUserService.queryById(bo.getUserId());
|
|
|
+ CourseSectionVo sectionVo = iCourseSectionService.queryById(bo.getSectionId());
|
|
|
+ PolyvLiveQueryBo queryBo = new PolyvLiveQueryBo();
|
|
|
+ queryBo.setUserAccount(user.getUserAccount());
|
|
|
+ queryBo.setChannelId(sectionVo.getLiveUrl());
|
|
|
+ queryBo.setStartTime(sectionVo.getRealLiveStartTime());
|
|
|
+ queryBo.setEndTime(sectionVo.getRealLiveEndTime());
|
|
|
+ return iPolyvLiveService.ListChannelViewlog(queryBo);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//判断当前未看完的节是否是点击播放的节
|
|
|
private boolean compareSection(UserStudyRecordVo recordVo,UserStudyRecordQueryBo entity){
|