|
@@ -20,9 +20,12 @@ import com.zhongzheng.modules.course.mapper.CourseSectionMapper;
|
|
|
import com.zhongzheng.modules.course.service.*;
|
|
|
import com.zhongzheng.modules.course.vo.CourseSectionImport;
|
|
|
import com.zhongzheng.modules.course.vo.CourseSectionVo;
|
|
|
+import com.zhongzheng.modules.polyv.bo.PolyvLiveQueryBo;
|
|
|
+import com.zhongzheng.modules.polyv.service.IPolyvLiveService;
|
|
|
import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
|
|
|
import com.zhongzheng.modules.polyv.vo.PolyvVideoQuerVo;
|
|
|
import com.zhongzheng.modules.system.domain.SysRoleMenu;
|
|
|
+import net.polyv.live.v1.entity.chat.LiveGetMessageListResponse;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -31,6 +34,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
+import java.security.NoSuchAlgorithmException;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@@ -75,6 +80,9 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
|
@Autowired
|
|
|
private IPolyvVideoService iPolyvVideoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IPolyvLiveService iPolyvLiveService;
|
|
|
+
|
|
|
@Override
|
|
|
public CourseSectionVo queryById(Long sectionId){
|
|
|
CourseSection db = this.baseMapper.selectById(sectionId);
|
|
@@ -343,6 +351,27 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
|
return this.baseMapper.overSectionList(startTime,endTime);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取节保利威聊天历史
|
|
|
+ * @param bo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<LiveGetMessageListResponse.MessageList> GetHistoryChatMsg(CourseSectionQueryBo bo) throws IOException, NoSuchAlgorithmException {
|
|
|
+ CourseSectionVo section = queryById(bo.getSectionId());
|
|
|
+ if(Validator.isNotEmpty(section)){
|
|
|
+ if(section.getSectionType()!=2){
|
|
|
+ throw new CustomException("只支持查询回放聊天内容");
|
|
|
+ }
|
|
|
+ PolyvLiveQueryBo queryBo = BeanUtil.toBean(bo, PolyvLiveQueryBo.class);
|
|
|
+ queryBo.setSectionId(bo.getSectionId());
|
|
|
+ queryBo.setStartTime(section.getRealLiveStartTime());
|
|
|
+ queryBo.setEndTime(section.getRealLiveEndTime());
|
|
|
+ return iPolyvLiveService.GetHistoryChatMsg(queryBo);
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public String insertByAddBoImport(CourseSectionAddBo bo, String errorLog, Integer no) {
|
|
|
CourseSection add = BeanUtil.toBean(bo, CourseSection.class);
|