| | |
| | | */ |
| | | @ApiOperation(value = "获取创建人的直播列表") |
| | | @GetMapping(value = "list") |
| | | public Result list(String keyword, Integer pageNum, Integer pageSize) { |
| | | public Result list(String keyword,String portalStatus, Integer pageNum, Integer pageSize) { |
| | | |
| | | List<MediaVideoLive> data = liveService.listOfMine(keyword, pageNum, pageSize); |
| | | List<MediaVideoLive> data = liveService.listOfMine(keyword,portalStatus, pageNum, pageSize); |
| | | int count = liveService.listCountOfMine(keyword); |
| | | |
| | | return new Result(true, "success", CollectionUtils.newObjectMap("videoLiveCount", count, |
| | |
| | | "pushUrl","rtmpPushUrl", |
| | | "hlsPullUrl","hlsPullUrl", |
| | | "previewImgUrl","previewImgUrl", |
| | | "courseId","courseId" |
| | | "courseId","courseId", |
| | | "portalStatus","portalStatus" |
| | | )))); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "创建编辑直播") |
| | | @PostMapping(value = "addOrUpdate") |
| | | public Result addOrUpdate(String videoLiveId, String name, String content,String teacherId,String teacherName,String subjectId, |
| | | String subjectName,String definition,String imgPath, long startTime,long endTime, boolean isPlayBack, String classIds) throws Exception { |
| | | String subjectName,String definition,String imgPath, long startTime,long endTime, boolean isPlayBack, String classIds,String portalStatus) throws Exception { |
| | | MTCloud client = new MTCloud(); |
| | | HashMap<Object,Object> options = new HashMap<Object,Object>(); |
| | | options.put("barrage", 1); |
| | |
| | | //json转换拿到courseId |
| | | JSONObject jsonObject = JSON.parseObject(s); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | // System.out.println(Integer.parseInt(course_id)); |
| | | if(jsonObject.getString("code").equals("0")) { |
| | | String course_id = (String) data.get("course_id"); |
| | | liveService.add(name, content,teacherId,teacherName,subjectId,subjectName,definition,imgPath, new Date(startTime), new Date(endTime),Integer.parseInt(course_id), isPlayBack, StringUtils.isEmpty(classIds)?null:CollectionUtils.newList(String.class,classIds.split(","))); |
| | | liveService.add(name, content,teacherId,teacherName,subjectId,subjectName,definition,imgPath, new Date(startTime), new Date(endTime),Integer.parseInt(course_id), isPlayBack, StringUtils.isEmpty(classIds)?null:CollectionUtils.newList(String.class,classIds.split(",")),portalStatus); |
| | | return new Result(true, "成功", s); |
| | | } |
| | | return new Result(false,jsonObject.getString("msg")); |