mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 20:36:50 +08:00
在线课固定时长问题修改
This commit is contained in:
@@ -55,10 +55,11 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
||||
//新增的情况
|
||||
cc.setDeleted(false);
|
||||
if (cc.getDuration()==null){
|
||||
if (exam != null){
|
||||
cc.setDuration(exam.getTestDuration()*60);
|
||||
}else {
|
||||
cc.setDuration(0);
|
||||
cc.setDuration(0);
|
||||
}
|
||||
if(exam!=null) {
|
||||
if (exam.getTestDuration()!=null) {
|
||||
cc.setDuration(exam.getTestDuration() * 60);
|
||||
}
|
||||
}
|
||||
//如果是没有目录的,并具是课程内容
|
||||
@@ -70,8 +71,10 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
||||
}
|
||||
ccDao.save(cc);
|
||||
}else {
|
||||
if (cc.getDuration()!=null) {
|
||||
cc.setDuration(cc.getDuration());
|
||||
if(exam!=null) {
|
||||
if (exam.getTestDuration()!=null) {
|
||||
cc.setDuration(exam.getTestDuration() * 60);
|
||||
}
|
||||
}
|
||||
ccDao.update(cc);
|
||||
cc.setSysVersion(ccDao.getVersion(cc.getId()));
|
||||
|
||||
Reference in New Issue
Block a user