From 792da3dcdef9679c36adc4d54f3bff0f415c0fe2 Mon Sep 17 00:00:00 2001 From: EricsHu <hrr145632> Date: 星期四, 11 五月 2023 16:53:23 +0800 Subject: [PATCH] 111 --- src/main/java/com/qxueyou/scc/controller/VideoLiveController.java | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/qxueyou/scc/controller/VideoLiveController.java b/src/main/java/com/qxueyou/scc/controller/VideoLiveController.java index f18bac9..bab0bf5 100644 --- a/src/main/java/com/qxueyou/scc/controller/VideoLiveController.java +++ b/src/main/java/com/qxueyou/scc/controller/VideoLiveController.java @@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.hankcs.hanlp.corpus.tag.Nature; +import com.qxueyou.scc.base.dao.CommonDAO; import com.qxueyou.scc.sdk.MTCloud; import io.swagger.models.auth.In; import org.apache.commons.lang3.StringUtils; @@ -136,11 +137,11 @@ JSONObject data = jsonObject.getJSONObject("data"); String course_id = (String) data.get("course_id"); // System.out.println(Integer.parseInt(course_id)); - if(Nature.s !=null) { + if(jsonObject.getString("code").equals("0")) { 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(","))); return new Result(true, "鎴愬姛", s); } - return new Result(false); + return new Result(false,jsonObject.getString("msg")); } @ApiOperation(value = "寮�鍚洿鎾�") @@ -159,7 +160,19 @@ return new Result(true,"寮�鍚垚鍔�",protocol); } - @ApiOperation(value = "鍦ㄧ嚎鏃堕暱") + @ApiOperation(value = "淇敼鐩存挱鐘舵��") + @GetMapping(value = "updateLive") + public Result updateLive(Integer courseId) { + + MediaVideoLive revamp = liveService.revamp(courseId); + revamp.setStatus(MediaVideoLive.STATUS_LIVE_STOP); + CommonDAO commonDAO=new CommonDAO(); + commonDAO.update(revamp); + + return new Result(true,"鍏抽棴鎴愬姛"); + } + + @ApiOperation(value = "鍦ㄧ嚎鏃堕暱") @GetMapping(value = "onlineCommunication") public Result onlineCommunication(String courseId,Integer page, Integer size) throws Exception { MTCloud client = new MTCloud(); -- Gitblit v1.8.0