mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 03:16:48 +08:00
content表添加processVideo字段,添加判断
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.xboe.module.course.service.impl;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -143,10 +145,12 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
||||
|
||||
@Override
|
||||
public void updateProcessVideo(String id, String courseId, Float processVideo) {
|
||||
CourseContent cc= new CourseContent();
|
||||
cc.setProgressVideo(processVideo);
|
||||
String sql = "update boe_course_content set progress_video="+ processVideo+" where id="+id+" and course_id="+courseId+" ";
|
||||
ccDao.sqlUpdate(sql);
|
||||
// 处理 processVideo 为 null 的情况
|
||||
if (processVideo == null) {
|
||||
processVideo = 0.0f;
|
||||
}
|
||||
String sql = "UPDATE boe_course_content SET progress_video = "+ processVideo+" WHERE id = "+ id+" AND course_id = "+ courseId+" ";
|
||||
ccDao.update(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user