Compare commits

..

5 Commits

Author SHA1 Message Date
670788339
52cd846750 日志 2024-09-02 15:22:01 +08:00
670788339
89fb61b9d0 日志 2024-09-02 15:15:59 +08:00
670788339
e67b2db8df 日志 2024-09-02 14:46:58 +08:00
670788339
66225736e6 Keyword 日志 2024-09-02 12:02:07 +08:00
670788339
ee93a0c0dc Keyword null显示'' 2024-09-02 11:49:11 +08:00
5 changed files with 9 additions and 35 deletions

View File

@@ -84,11 +84,6 @@ public class CourseContent extends BaseEntity {
@Column(name = "duration")
private Integer duration;
/**
* 视频播放进度
* */
@Column(name = "progress_video")
private Float progressVideo;
/**用于学习时的状态显示,非存储字段*/
@Transient

View File

@@ -82,7 +82,4 @@ public interface ICourseContentService{
* @return
*/
CourseAssess getAssess(String ccid);
void updateProcessVideo(String contentId, String courseId, Float processVideo);
}

View File

@@ -1,7 +1,5 @@
package com.xboe.module.course.service.impl;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;
import javax.annotation.Resource;
@@ -143,17 +141,6 @@ public class CourseContentServiceImpl implements ICourseContentService {
return assess;
}
@Override
@Transactional
public void updateProcessVideo(String id, String courseId, Float progressVideo) {
// 处理 processVideo 为 null 的情况
if (progressVideo == null) {
progressVideo = 0.00f;
}
String sql = "UPDATE boe_course_content SET progress_video = "+ progressVideo+" WHERE id = "+ id+" AND course_id = "+ courseId+" ";
ccDao.sqlUpdate(sql);
}
@Override
@Transactional
public void updateName(String id, String name) {

View File

@@ -28,7 +28,7 @@ public class ExamTest extends BaseEntity {
/**
* 考试名称
* */
@Column(name = "test_name",length = 50)
@Column(name = "test_name",nullable = false,length = 50)
private String testName;
/**
@@ -46,7 +46,7 @@ public class ExamTest extends BaseEntity {
/**
* 考试时长 分钟
* */
@Column(name = "test_duration")
@Column(name = "test_duration",nullable = false)
private Integer testDuration;
/**
* 显示解析
@@ -107,13 +107,13 @@ public class ExamTest extends BaseEntity {
/**
* 考试的类型
* */
@Column(name = "test_type")
@Column(name = "test_type",nullable = false)
private Integer testType;
/**
* 发布状态 ,是否已发布
*/
@Column(name = "published",length = 1)
@Column(name = "published",length = 1,nullable = false)
private Boolean published;
/**
* 发布时间
@@ -154,7 +154,7 @@ public class ExamTest extends BaseEntity {
/**
* 范围1表独立使用2表课程内部
* */
@Column(name = "range_type")
@Column(name = "range_type",nullable = false)
private Integer rangeType;
/**
@@ -178,6 +178,4 @@ public class ExamTest extends BaseEntity {
@Transient
private String paperName;
}

View File

@@ -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 progressVideo){
public JsonResponse<Boolean> study(String studyId,String itemId,Integer videoTime){
if(StringUtils.isBlank(itemId)){
return error("参数错误");
@@ -540,9 +540,6 @@ public class StudyCourseApi extends ApiBaseController{
//检查是否已存在
try {
studyService.updateLastTime(itemId,videoTime,getCurrent().getAccountId());
if (contentId != null && courseId != null && progressVideo != null){
contentService.updateProcessVideo(contentId, courseId, progressVideo);
}
return success(true);
}catch(Exception e) {
log.error("记录最后学习时间错误",e);