mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
无目录无权限不能报名
This commit is contained in:
@@ -228,7 +228,7 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
|
||||
//检查是否已报名
|
||||
StudyCourse sc=service.findByCourseIdAndAid(cid, aid);
|
||||
if(sc==null) {
|
||||
if(pass==true && sc==null) {
|
||||
//未报名,这里直接报名
|
||||
StudySignup signup=new StudySignup();
|
||||
signup.setCourseId(cid);
|
||||
@@ -246,13 +246,13 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
signup.setSignTime(LocalDateTime.now());
|
||||
sc=service.autoSignup(signup);
|
||||
}
|
||||
|
||||
rs.put("signup",true);
|
||||
rs.put("studyId", sc.getId());//学习id
|
||||
rs.put("progress", sc.getProgress());
|
||||
//查询上次学习的是什么资源。查询用户的学习情况
|
||||
List<StudyCourseItem> items=studyService.findByStudyId(sc.getId());
|
||||
rs.put("contentStudys",items);//学习的内容
|
||||
if (sc !=null){
|
||||
rs.put("studyId", sc.getId());//学习id
|
||||
rs.put("progress", sc.getProgress());
|
||||
//查询上次学习的是什么资源。查询用户的学习情况
|
||||
List<StudyCourseItem> items=studyService.findByStudyId(sc.getId());
|
||||
rs.put("contentStudys",items);//学习的内容
|
||||
}
|
||||
|
||||
return success(rs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user