mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 10:56:50 +08:00
添加视频暂存点
This commit is contained in:
@@ -144,6 +144,7 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateProcessVideo(String id, String courseId, Float progressVideo) {
|
||||
// 处理 processVideo 为 null 的情况
|
||||
if (progressVideo == null) {
|
||||
|
||||
@@ -529,7 +529,7 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/study-video-time")
|
||||
public JsonResponse<Boolean> study(String itemId,Integer videoTime,String contentId , String courseId,Float processVideo){
|
||||
public JsonResponse<Boolean> study(String itemId,Integer videoTime,String contentId , String courseId,Float progressVideo){
|
||||
|
||||
if(StringUtils.isBlank(itemId)){
|
||||
return error("参数错误");
|
||||
@@ -537,11 +537,15 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
if(videoTime==null){
|
||||
return error("无时间点");
|
||||
}
|
||||
if (progressVideo == null){
|
||||
return error("无暂存时间点");
|
||||
}
|
||||
//检查是否已存在
|
||||
|
||||
try {
|
||||
studyService.updateLastTime(itemId,videoTime,getCurrent().getAccountId());
|
||||
studyService.updateLastTime(itemId,videoTime, getCurrent().getAccountId());
|
||||
if (contentId != null && courseId != null){
|
||||
contentService.updateProcessVideo(contentId, courseId, processVideo);
|
||||
contentService.updateProcessVideo(contentId, courseId, progressVideo);
|
||||
}
|
||||
return success(true);
|
||||
}catch(Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user