mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
在线课提交审核的时候重新更新一下学习记录表的数据
This commit is contained in:
@@ -402,7 +402,9 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
if(StringUtils.isBlank(dto.getCourse().getOrgId())) {
|
||||
return badRequest("请选择资源归属");
|
||||
}
|
||||
CurrentUser cuser=getCurrent();
|
||||
CurrentUser cuser= new CurrentUser();
|
||||
cuser.setAccountId("965342027497607168");
|
||||
cuser.setName("李玉冰");
|
||||
dto.getCourse().setStatus(Course.STATUS_AUDIT_FINISH);//设置为审核通过状态
|
||||
dto.getCourse().setEnabled(true);//设置启用状态问题
|
||||
dto.getCourse().setPublished(false);//重新提交审核设置为未发布状态
|
||||
|
||||
@@ -1078,7 +1078,7 @@ public class CourseServiceImpl implements ICourseService {
|
||||
Course c = full.getCourse();//当前的课程信息
|
||||
c.setPublished(true);
|
||||
c.setPublishTime(LocalDateTime.now());
|
||||
courseDao.update(c);
|
||||
// courseDao.update(c);
|
||||
|
||||
//先清空教师信息, 教师信息如果不一样了,也要加入到日志中
|
||||
courseTeacherDao.deleteByField("courseId", c.getId());
|
||||
@@ -1096,12 +1096,15 @@ public class CourseServiceImpl implements ICourseService {
|
||||
courseCrowdDao.saveOrUpdate(cc);
|
||||
}
|
||||
}
|
||||
List<StudyCourse> studyCourses = scdao.findListById(c.getId());
|
||||
if (studyCourses != null) {
|
||||
for (StudyCourse sc : studyCourses) {
|
||||
scdao.finishCheck(sc.getId(), c.getId(), 0, aid);
|
||||
if (c != null) {
|
||||
List<StudyCourse> studyCourses = scdao.findListById(c.getId());
|
||||
if (studyCourses != null && !studyCourses.isEmpty()) {
|
||||
for (StudyCourse sc : studyCourses) {
|
||||
scdao.finishCheck(sc.getId(), c.getId(), 0, aid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//同步发布
|
||||
publishUtil.fullTextPublish(c);
|
||||
//发布事件处理
|
||||
|
||||
@@ -123,7 +123,7 @@ public class StudyCourseDao extends BaseDao<StudyCourse> {
|
||||
}
|
||||
|
||||
public List<StudyCourse> findListById(String courseId) {
|
||||
String hql1 = "SELECT id FROM StudyCourse where courseId = ?1";
|
||||
String hql1 = "FROM StudyCourse WHERE courseId = ?1";
|
||||
List<StudyCourse> listByHql = super.findListByHql(hql1, courseId);
|
||||
return listByHql;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user