mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-13 04:46:50 +08:00
课程AI设置优化
This commit is contained in:
@@ -490,25 +490,27 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
.aiSet(course.getAiSet())
|
.aiSet(course.getAiSet())
|
||||||
.languageStatus(course.getLanguageStatus())
|
.languageStatus(course.getLanguageStatus())
|
||||||
.build() ;
|
.build() ;
|
||||||
for (CourseContent cc : cclist) {
|
if(cclist != null && !cclist.isEmpty()){
|
||||||
//筛选视频资源
|
for (CourseContent cc : cclist) {
|
||||||
if(cc.getContentType() == 10 ){
|
//筛选视频资源
|
||||||
JSONObject json = JSONObject.parseObject(cc.getContent());
|
if(cc.getContentType() == 10 ){
|
||||||
if(json == null || json.getString("url") == null) {
|
JSONObject json = JSONObject.parseObject(cc.getContent());
|
||||||
continue;
|
if(json == null || json.getString("url") == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String videoUrl = json.getString("url");
|
||||||
|
//String videoUrlPerfix = "https://u-pre.boe.com/upload"; //测试
|
||||||
|
//String videoUrlPerfix = "https://u.boe.com/upload"; //生产
|
||||||
|
String videoType = videoUrl.substring(videoUrl.lastIndexOf(".")+1);
|
||||||
|
videoList.add(BoeaiVideoResourceDto.builder()
|
||||||
|
.courseId(cc.getCourseId())
|
||||||
|
.videoId(cc.getId())
|
||||||
|
.title(cc.getContentName())
|
||||||
|
.originalUrl(videoUrlPerfix+videoUrl)
|
||||||
|
.duration(cc.getDuration())
|
||||||
|
.format(videoType)
|
||||||
|
.build());
|
||||||
}
|
}
|
||||||
String videoUrl = json.getString("url");
|
|
||||||
//String videoUrlPerfix = "https://u-pre.boe.com/upload"; //测试
|
|
||||||
//String videoUrlPerfix = "https://u.boe.com/upload"; //生产
|
|
||||||
String videoType = videoUrl.substring(videoUrl.lastIndexOf(".")+1);
|
|
||||||
videoList.add(BoeaiVideoResourceDto.builder()
|
|
||||||
.courseId(cc.getCourseId())
|
|
||||||
.videoId(cc.getId())
|
|
||||||
.title(cc.getContentName())
|
|
||||||
.originalUrl(videoUrlPerfix+videoUrl)
|
|
||||||
.duration(cc.getDuration())
|
|
||||||
.format(videoType)
|
|
||||||
.build());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
boeaiCourseDto.setBoeaiVideoResourceReqList(videoList);
|
boeaiCourseDto.setBoeaiVideoResourceReqList(videoList);
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
rs.setCount(listByFilters2.size());
|
rs.setCount(listByFilters2.size());
|
||||||
rs.setPageSize(pageSize);
|
rs.setPageSize(pageSize);
|
||||||
rs.setList(paginate);
|
rs.setList(paginate);
|
||||||
if (!paginate.isEmpty()) {
|
if (paginate != null && !paginate.isEmpty()) {
|
||||||
log.info("-----KJB------ getCourse");
|
log.info("-----KJB------ getCourse");
|
||||||
for (Course course : paginate) {
|
for (Course course : paginate) {
|
||||||
this.getCourseFromKJB(course);
|
this.getCourseFromKJB(course);
|
||||||
|
|||||||
@@ -217,9 +217,11 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
List<CourseSection> sectionlist=sectionService.getByCourseId(cid);
|
List<CourseSection> sectionlist=sectionService.getByCourseId(cid);
|
||||||
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(cid);
|
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(cid);
|
||||||
|
|
||||||
for (CourseContent cc : cclist) {
|
if(cclist!=null && !cclist.isEmpty()){
|
||||||
log.info("根据视频信息查询AI字幕数据:cc = " + cc.toString());
|
for (CourseContent cc : cclist) {
|
||||||
this.getVtt( cid , cc);
|
log.info("根据视频信息查询AI字幕数据:cc = " + cc.toString());
|
||||||
|
this.getVtt( cid , cc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取教师的介绍信息,因为一门课程 的教师不会太多,所以这里简单直接遍历查询,后续再优化
|
//获取教师的介绍信息,因为一门课程 的教师不会太多,所以这里简单直接遍历查询,后续再优化
|
||||||
|
|||||||
Reference in New Issue
Block a user