Merge branch 'zcwy0716-llf' into dev0525

This commit is contained in:
nisen
2024-07-17 18:41:30 +08:00

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("没有找到在线课内容数据。");