mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 11:26:50 +08:00
AI字幕数据查询
This commit is contained in:
@@ -210,9 +210,7 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
List<CourseContent> cclist=contentService.getByCourseId(cid);
|
||||
List<CourseSection> sectionlist=sectionService.getByCourseId(cid);
|
||||
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(cid);
|
||||
if(cclist == null || cclist.size() == 0){
|
||||
log.info("========查询到视频数据=========");
|
||||
}
|
||||
|
||||
for (CourseContent cc : cclist) {
|
||||
log.info("根据视频信息查询AI字幕数据:cc = " + cc.toString());
|
||||
this.getVtt( cid , cc);
|
||||
@@ -345,18 +343,19 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
}
|
||||
//将返回string 转为json对象
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
JSONArray rows = jsonObject.getJSONArray("rows");
|
||||
JSONArray rows = jsonObject.getJSONArray("data");
|
||||
//将json数组转为list对象
|
||||
|
||||
List<BoeaiSubtitleRsp> boeaiSubtitleRspList = new ArrayList<>();
|
||||
//循环json对象
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
//将json对象转为实体对象 CourseContentVtt
|
||||
BoeaiSubtitleRsp vtt = row.toJavaObject(BoeaiSubtitleRsp.class);
|
||||
boeaiSubtitleRspList.add(vtt);
|
||||
if(rows != null && !rows.isEmpty()){
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
//将json对象转为实体对象 CourseContentVtt
|
||||
BoeaiSubtitleRsp vtt = row.toJavaObject(BoeaiSubtitleRsp.class);
|
||||
boeaiSubtitleRspList.add(vtt);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user