考试相关
This commit is contained in:
@@ -118,8 +118,8 @@ public class ClassExamServiceImpl extends ServiceImpl<ClassExamDao, ClassExam> i
|
||||
List<Map<String,Object>> sList = new ArrayList<>();
|
||||
List<Map<String,Object>> mList = new ArrayList<>();
|
||||
if (courseList.size() > 0) {
|
||||
int stotal = 10;//单选题总数
|
||||
int mtotal = 10;//多选题总数
|
||||
int stotal = 5;//单选题总数
|
||||
int mtotal = 5;//多选题总数
|
||||
int snum = (int)Math.floor(stotal/courseList.size());
|
||||
int mnum = (int)Math.floor(mtotal/courseList.size());
|
||||
for (ClassCourse classCourse:courseList){
|
||||
@@ -179,7 +179,7 @@ public class ClassExamServiceImpl extends ServiceImpl<ClassExamDao, ClassExam> i
|
||||
classExamUser.setSubject(JSONUtil.toJsonStr(resultList));
|
||||
classExamUser.setUserId(ShiroUtils.getUId());
|
||||
classExamUserDao.insert(classExamUser);
|
||||
return R.ok().put("examPaper",resultList);
|
||||
return R.ok().put("examPaper",resultList).put("id",classExamUser.getId());
|
||||
|
||||
}
|
||||
|
||||
@@ -229,7 +229,9 @@ public class ClassExamServiceImpl extends ServiceImpl<ClassExamDao, ClassExam> i
|
||||
@Override
|
||||
public Object getExamPaperInfo(Map<String, Object> params) {
|
||||
List<ClassExamUser> classExamUserList = classExamUserDao.selectList(new LambdaQueryWrapper<ClassExamUser>()
|
||||
.eq(ClassExamUser::getClassId,params.get("classId")).eq(ClassExamUser::getUserId,params.get("userId")));
|
||||
.eq(ClassExamUser::getClassId,params.get("classId"))
|
||||
.eq(ClassExamUser::getUserId,params.get("userId"))
|
||||
.orderByDesc(ClassExamUser::getScore));
|
||||
return classExamUserList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user