AI字幕数据查询

This commit is contained in:
huangrun
2025-11-19 19:33:21 +08:00
parent bffb85848f
commit 2e4b04d1d1

View File

@@ -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);
}
}
}
/**