| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | @Api(tags="直播接口-学员端") |
| | | @Api(tags="直播接口-学员端") |
| | | @RestController |
| | | @RequestMapping(value = "/stu/live") |
| | | public class StuLiveController { |
| | |
| | | }; |
| | | |
| | | /** |
| | | * 获取直播列表 |
| | | * @param classId 班级id |
| | | * 获取直播列表 |
| | | * @param classId 班级id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取直播列表", notes = "") |
| | | @ApiOperation(value = "获取直播列表", notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "classId", value = "班级id", required = true, paramType="query", dataType = "String"), |
| | | @ApiImplicitParam(name = "status", value = "直播状态(2正在直播,5直播中的暂停状态,9停止直播,3回放)", required = true, paramType="query", dataType = "String"), |
| | | @ApiImplicitParam(name = "classId", value = "班级id", required = true, paramType="query", dataType = "String"), |
| | | @ApiImplicitParam(name = "status", value = "直播状态(2正在直播,5直播中的暂停状态,9停止直播,3回放)", required = true, paramType="query", dataType = "String"), |
| | | }) |
| | | @GetMapping(value = "list") |
| | | public Result list(String classId, Short status) { |
| | |
| | | "previewImgUrl","imgPath" |
| | | )); |
| | | |
| | | //添加聊天室id |
| | | //添加聊天室id |
| | | if(lst!=null && lst.size()>0){ |
| | | for(Map<String,Object> map:lst) { |
| | | map.put("chatroomId", dao.getChatRoomId((String)map.get("videoLiveId"))); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取直播id |
| | | * 获取直播id |
| | | * @param classId |
| | | * @return |
| | | */ |
| | | private List<String> getLiveIdLst(String classId) { |
| | | List<String> liveIds = new ArrayList<String>(5); |
| | | |
| | | //获取班级列表及班级所在直播列表 |
| | | //获取班级列表及班级所在直播列表 |
| | | if(StringUtils.isNotEmpty(classId)) { |
| | | liveIds = dao.getClassLives(classId); |
| | | }else { //查询学员所在的全部班级 |
| | | }else { //查询学员所在的全部班级 |
| | | List<ClsClass> clsLst = classService.listMyClass(); |
| | | Set<String> ids = new HashSet<String>(); |
| | | for(ClsClass cls:clsLst) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查看直播明细 |
| | | * @param liveId 直播id |
| | | * 查看直播明细 |
| | | * @param liveId 直播id |
| | | * @return |
| | | */ |
| | | @GetMapping(value = "view") |