|
@@ -42,9 +42,9 @@ import cn.com.qmth.examcloud.service.examwork.dao.CourseGroupRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamOrgRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamStudentRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.Exam;
|
|
|
-import cn.com.qmth.examcloud.service.examwork.entity.CourseGroup;
|
|
|
+import cn.com.qmth.examcloud.service.examwork.entity.CourseGroupEntity;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.CourseGroupRelation;
|
|
|
-import cn.com.qmth.examcloud.service.examwork.entity.ExamOrg;
|
|
|
+import cn.com.qmth.examcloud.service.examwork.entity.ExamOrgEntity;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.ExamOrgPK;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.ExamStudent;
|
|
|
import cn.com.qmth.examcloud.service.examwork.enums.ExamType;
|
|
@@ -281,11 +281,11 @@ public class ExamApi extends ControllerSupport {
|
|
|
@PathVariable Integer curPage, @PathVariable Integer pageSize) {
|
|
|
|
|
|
Pageable pageable = new PageRequest(curPage-1, pageSize, Sort.Direction.DESC, "updateTime");
|
|
|
- List<CourseGroup> groupList = courseGroupRepo.findAllByExamId(examId, pageable);
|
|
|
+ List<CourseGroupEntity> groupList = courseGroupRepo.findAllByExamId(examId, pageable);
|
|
|
|
|
|
List<CourseGroupBean> ret = Lists.newArrayList();
|
|
|
|
|
|
- for (CourseGroup curCourseGroup : groupList) {
|
|
|
+ for (CourseGroupEntity curCourseGroup : groupList) {
|
|
|
CourseGroupBean bean = new CourseGroupBean();
|
|
|
bean.setBeginTime(curCourseGroup.getBeginTime());
|
|
|
bean.setCreationTime(curCourseGroup.getCreationTime());
|
|
@@ -326,12 +326,12 @@ public class ExamApi extends ControllerSupport {
|
|
|
groupIdList.add(groupId);
|
|
|
}
|
|
|
|
|
|
- List<CourseGroup> groupList = courseGroupRepo
|
|
|
+ List<CourseGroupEntity> groupList = courseGroupRepo
|
|
|
.findAllByIdInOrderByUpdateTimeDesc(groupIdList);
|
|
|
|
|
|
List<CourseGroupBean> ret = Lists.newArrayList();
|
|
|
|
|
|
- for (CourseGroup curCourseGroup : groupList) {
|
|
|
+ for (CourseGroupEntity curCourseGroup : groupList) {
|
|
|
CourseGroupBean bean = new CourseGroupBean();
|
|
|
bean.setBeginTime(curCourseGroup.getBeginTime());
|
|
|
bean.setCreationTime(curCourseGroup.getCreationTime());
|
|
@@ -361,7 +361,7 @@ public class ExamApi extends ControllerSupport {
|
|
|
public void updateCourseGroup(@RequestBody CourseGroupBean courseGroupBean,
|
|
|
HttpServletRequest request) {
|
|
|
|
|
|
- CourseGroup courseGroup = new CourseGroup();
|
|
|
+ CourseGroupEntity courseGroup = new CourseGroupEntity();
|
|
|
courseGroup.setBeginTime(courseGroupBean.getBeginTime());
|
|
|
courseGroup.setCreationTime(courseGroupBean.getCreationTime());
|
|
|
courseGroup.setDescription(courseGroupBean.getDescription());
|
|
@@ -400,28 +400,28 @@ public class ExamApi extends ControllerSupport {
|
|
|
public List<?> getExamOrgList(@PathVariable Long examId, @PathVariable Integer curPage,
|
|
|
@PathVariable Integer pageSize) {
|
|
|
Pageable pageable = new PageRequest(curPage-1, pageSize, Sort.Direction.DESC, "updateTime");
|
|
|
- List<ExamOrg> allByExamId = examOrgRepo.findAllByExamId(examId, pageable);
|
|
|
+ List<ExamOrgEntity> allByExamId = examOrgRepo.findAllByExamId(examId, pageable);
|
|
|
return allByExamId;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "新增考试相关的学习中心设置", notes = "")
|
|
|
@PostMapping("/exam/examOrg")
|
|
|
- public ExamOrg addExamOrg(@RequestBody ExamOrg examOrg) {
|
|
|
- ExamOrg ret = examOrgRepo.save(examOrg);
|
|
|
+ public ExamOrgEntity addExamOrg(@RequestBody ExamOrgEntity examOrg) {
|
|
|
+ ExamOrgEntity ret = examOrgRepo.save(examOrg);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "更新考试相关的学习中心设置", notes = "")
|
|
|
@PutMapping("/exam/examOrg")
|
|
|
- public ExamOrg updateExamOrg(@RequestBody ExamOrg examOrg) {
|
|
|
- ExamOrg ret = examOrgRepo.save(examOrg);
|
|
|
+ public ExamOrgEntity updateExamOrg(@RequestBody ExamOrgEntity examOrg) {
|
|
|
+ ExamOrgEntity ret = examOrgRepo.save(examOrg);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除考试相关的学习中心设置", notes = "")
|
|
|
@DeleteMapping("/exam/examOrg/{examId}/{orgId}")
|
|
|
public void deleteExamOrg(@PathVariable Long examId, @PathVariable Long orgId) {
|
|
|
- ExamOrg examOrg = new ExamOrg();
|
|
|
+ ExamOrgEntity examOrg = new ExamOrgEntity();
|
|
|
examOrg.setExamId(examId);
|
|
|
examOrg.setOrgId(orgId);
|
|
|
examOrgRepo.delete(examOrg);
|