在线管理资源完成情况修改,添加日志,先暂时注释

This commit is contained in:
zhaolongfei
2024-07-17 18:40:04 +08:00
parent 69b6a50011
commit 16c755d14d

View File

@@ -141,20 +141,21 @@ public class StudySignupServiceImpl implements IStudySignupService{
if (!courseContents.isEmpty()) { if (!courseContents.isEmpty()) {
log.info("查看在线课集合内容数据(共 {} 条记录)", courseContents.toString()); log.info("查看在线课集合内容数据(共 {} 条记录)", courseContents.toString());
for (CourseContent c : courseContents){ for (CourseContent c : courseContents){
log.info("查看在线课内容数据: {}", c); log.info("查看在线课内容数据: {}", c);
// 使用toString()或自定义格式化字符串 // 使用toString()或自定义格式化字符串
StudyCourseItem scitem = new StudyCourseItem(); StudyCourseItem scitem = new StudyCourseItem();
// 设置scitem的属性 // 设置scitem的属性
scitem.setAname(signup.getName()); scitem.setAname(signup.getName());
scitem.setAid(signup.getAid()); scitem.setAid(signup.getAid());
scitem.setCourseId(signup.getCourseId()); scitem.setCourseId(signup.getCourseId());
scitem.setProgress(0); scitem.setProgress(0);
scitem.setScore(0f); scitem.setScore(0f);
scitem.setStatus(1); scitem.setStatus(1);
scitem.setContentId(signup.getStudyId()); scitem.setContentId(c.getId());
// 如果需要可以取消注释以下行来设置contentName scitem.setStudyId(signup.getStudyId());
// scitem.setContentName(c.getContentName()); // 如果需要可以取消注释以下行来设置contentName
scItemDao.save(scitem); // scitem.setContentName(c.getContentName());
scItemDao.save(scitem);
} }
} else { } else {
log.info("没有找到在线课内容数据。"); log.info("没有找到在线课内容数据。");