he2802 3 years ago
parent
commit
2520786a45

+ 2 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/schedule/ScheduleController.java

@@ -190,9 +190,9 @@ public class ScheduleController extends BaseController {
     }
 
     @ApiOperation("测试")
-    @GetMapping("/getChannelVideo")
+    @GetMapping("/GetChannelBasicInfo")
     public AjaxResult getChannelVideo(PolyvLiveQueryBo bo) throws Exception {
-        iPolyvLiveService.getChannelVideo(bo);
+        iPolyvLiveService.GetChannelBasicInfo(bo);
         return AjaxResult.success();
     }
 

+ 12 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserStudyRecordController.java

@@ -9,6 +9,8 @@ import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
 import com.zhongzheng.modules.course.vo.CourseUserMenuVo;
 import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
 import com.zhongzheng.modules.grade.vo.ClassPeriodVo;
+import com.zhongzheng.modules.polyv.bo.PolyvLiveQueryBo;
+import com.zhongzheng.modules.polyv.service.IPolyvLiveService;
 import com.zhongzheng.modules.user.bo.UserStudyRecordAddBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordEditBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo;
@@ -18,6 +20,7 @@ import com.zhongzheng.modules.user.service.IUserStudyRecordService;
 import com.zhongzheng.modules.user.vo.SectionStudyRecordVo;
 import com.zhongzheng.modules.user.vo.UserStudyRecordVo;
 import lombok.RequiredArgsConstructor;
+import net.polyv.live.v1.entity.channel.operate.LiveChannelBasicInfoResponse;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -53,6 +56,9 @@ public class UserStudyRecordController extends BaseController {
 
     private final WxTokenService wxTokenService;
 
+    @Autowired
+    private IPolyvLiveService iPolyvLiveService;
+
     /**
      * 查询用户学习记录列表
      */
@@ -143,6 +149,12 @@ public class UserStudyRecordController extends BaseController {
         return AjaxResult.success(iUserStudyRecordService.getLastLive(bo));
     }
 
+    @ApiOperation("查询保利威直播间的播放状态")
+    @GetMapping("/getChannelBasicInfo")
+    public AjaxResult<LiveChannelBasicInfoResponse> getChannelBasicInfo(PolyvLiveQueryBo bo) throws Exception {
+        return AjaxResult.success(iPolyvLiveService.GetChannelBasicInfo(bo));
+    }
+
     @ApiOperation("查询用户最后一次看的直播节的信息")
     @GetMapping("/queryLiveLast")
     public AjaxResult<UserStudyRecordVo> queryLiveLast(UserStudyRecordQueryBo bo) throws Exception {

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/polyv/service/impl/PolyvLiveServiceImpl.java

@@ -220,6 +220,7 @@ public class PolyvLiveServiceImpl implements IPolyvLiveService {
             liveChannelBasicInfoResponse = new LiveChannelOperateServiceImpl().getChannelBasicInfo(
                     liveChannelBasicInfoRequest);
             if (liveChannelBasicInfoResponse != null) {
+    //            System.out.println(liveChannelBasicInfoResponse);
                return liveChannelBasicInfoResponse;
             }
         } catch (PloyvSdkException e) {

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserStudyRecordService.java

@@ -97,6 +97,8 @@ public interface IUserStudyRecordService extends IService<UserStudyRecord> {
 
 	SectionStudyRecordVo getLastLive(UserStudyRecordQueryBo bo) throws Exception;
 
+
+
 	List<SectionStudyRecordVo> userSectionLiveList(UserStudyRecordQueryBo bo);
 
 	List<LiveListChannelViewlogResponse.LiveChannelViewlog> userSectionLiveLog(UserStudyRecordQueryBo bo) throws IOException, NoSuchAlgorithmException;

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -566,6 +566,8 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
         return recordVo;
     }
 
+
+
     @Override
     public List<SectionStudyRecordVo> userSectionLiveList(UserStudyRecordQueryBo bo) {
         return this.baseMapper.userSectionLiveList(bo);