wangwei hace 6 años
padre
commit
540b2c3399

+ 4 - 4
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/ExamController.java

@@ -107,7 +107,7 @@ public class ExamController extends ControllerSupport {
 	ExamCourseGroupSettingsRepo courseGroupRepo;
 
 	@Autowired
-	ExamOrgSettingsRepo examOrgRepo;
+	ExamOrgSettingsRepo examOrgSettingsRepo;
 
 	@Autowired
 	ExamCourseGroupRelationRepo courseGroupRelationRepo;
@@ -635,7 +635,7 @@ public class ExamController extends ControllerSupport {
 		};
 
 		Pageable pageable = new PageRequest(curPage, pageSize, Sort.Direction.DESC, "updateTime");
-		Page<ExamOrgSettingsEntity> page = examOrgRepo.findAll(specification, pageable);
+		Page<ExamOrgSettingsEntity> page = examOrgSettingsRepo.findAll(specification, pageable);
 
 		Iterator<ExamOrgSettingsEntity> iterator = page.iterator();
 		List<ExamOrgSettingsDomain> domainList = Lists.newArrayList();
@@ -688,7 +688,7 @@ public class ExamController extends ControllerSupport {
 		}
 		validateRootOrgIsolation(examEntity.getRootOrgId());
 
-		ExamOrgSettingsEntity examOrgEntity = examOrgRepo.findByExamIdAndOrgId(examId,
+		ExamOrgSettingsEntity examOrgEntity = examOrgSettingsRepo.findByExamIdAndOrgId(examId,
 				accessUser.getOrgId());
 
 		return examOrgEntity;
@@ -780,7 +780,7 @@ public class ExamController extends ControllerSupport {
 		}
 		validateRootOrgIsolation(examEntity.getRootOrgId());
 
-		examOrgRepo.deleteByExamIdAndOrgId(examId, orgId);
+		examOrgSettingsRepo.deleteByExamIdAndOrgId(examId, orgId);
 	}
 
 	/**

+ 5 - 5
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/impl/ExamServiceImpl.java

@@ -43,7 +43,7 @@ public class ExamServiceImpl implements ExamService {
 	ExamStudentServiceImpl examStudentService;
 
 	@Autowired
-	ExamOrgSettingsRepo examOrgRepo;
+	ExamOrgSettingsRepo examOrgSettingsRepo;
 
 	@Autowired
 	OrgCloudService orgCloudService;
@@ -67,7 +67,7 @@ public class ExamServiceImpl implements ExamService {
 				throw new StatusException("", "[ " + exam.getName() + " ] 已经开考,不能删除");
 			}
 			// 删除学习中心考试时间
-			examOrgRepo.deleteByExamId(exam.getId());
+			examOrgSettingsRepo.deleteByExamId(exam.getId());
 			examStudentService.deleteExamStudentsByExamId(exam.getId());
 			examRepo.delete(exam);
 		}
@@ -201,13 +201,13 @@ public class ExamServiceImpl implements ExamService {
 		ExamOrgSettingsEntity examOrgEntity = null;
 
 		if (null == examOrgInfo.getId()) {
-			examOrgEntity = examOrgRepo.findByExamIdAndOrgId(examOrgInfo.getExamId(),
+			examOrgEntity = examOrgSettingsRepo.findByExamIdAndOrgId(examOrgInfo.getExamId(),
 					examOrgInfo.getOrgId());
 			if (null == examOrgEntity) {
 				examOrgEntity = new ExamOrgSettingsEntity();
 			}
 		} else {
-			examOrgEntity = examOrgRepo.findOne(examOrgInfo.getId());
+			examOrgEntity = examOrgSettingsRepo.findOne(examOrgInfo.getId());
 			if (null == examOrgEntity) {
 				throw new StatusException("E-001101", "id is wrong");
 			}
@@ -221,7 +221,7 @@ public class ExamServiceImpl implements ExamService {
 
 		Map<ExamProperty, String> map = checkAndGetExamProperties(examOrgInfo.getProperties());
 
-		ExamOrgSettingsEntity saved = examOrgRepo.save(examOrgEntity);
+		ExamOrgSettingsEntity saved = examOrgSettingsRepo.save(examOrgEntity);
 
 		for (Entry<ExamProperty, String> entry : map.entrySet()) {
 			ExamProperty prop = entry.getKey();