派生自 projectDept/qhighschool

胡仁荣
2023-05-09 d5c7f485091d29c3f469ad82847ed93b315b22a1
src/main/java/com/qxueyou/scc/controller/VideoLiveController.java
@@ -8,6 +8,7 @@
import com.alibaba.fastjson.JSONObject;
import com.hankcs.hanlp.corpus.tag.Nature;
import com.qxueyou.scc.sdk.MTCloud;
import io.swagger.models.auth.In;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -122,6 +123,7 @@
      options.put("robotNumber", 1);
      options.put("robotType", 1);
      options.put("pptDisplay", 1);
      options.put("modetype", 6);
      //将long类型转换为String类型
      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
      simpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT+00:00"));
@@ -157,6 +159,15 @@
      return new Result(true,"开启成功",protocol);
   }
   @ApiOperation(value = "在线时长")
   @GetMapping(value = "onlineCommunication")
   public Result onlineCommunication(String courseId,Integer page, Integer size) throws Exception {
      MTCloud client = new MTCloud();
      HashMap<Object,Object> options = new HashMap<Object, Object>();
      options.put("ssl", false);
      String res = client.courseVisitorList("3360573",10,1,options);
      return new Result(true,"开启成功",res);
   }
   /**
    * 查询直播详情
    *