Эх сурвалжийг харах

考区过滤掉试评数据

xiaof 5 жил өмнө
parent
commit
9124cd6f79

+ 2 - 0
stmms-ms-core/src/main/java/cn/com/qmth/stmms/ms/core/repository/ExamQuestionRepo.java

@@ -30,4 +30,6 @@ public interface ExamQuestionRepo extends JpaRepository<ExamQuestion, Long> {
     void deleteByWorkIdAndSubjectAndTest(Long workId, Subject subject, int test);
 
     List<ExamQuestion> findAllByAreaCodeAndSubjectAndWorkId(String areaCode, Subject subject, Long workId);
+
+    List<ExamQuestion> findByWorkIdAndSubjectAndTest(Long workId, Subject subject, int test);
 }

+ 2 - 1
stmms-ms-marking/src/main/java/cn/com/qmth/stmms/ms/marking/api/ExamQuestionApi.java

@@ -1,6 +1,7 @@
 package cn.com.qmth.stmms.ms.marking.api;
 
 import cn.com.qmth.stmms.ms.core.domain.ExamQuestion;
+import cn.com.qmth.stmms.ms.core.domain.enums.TrialEnum;
 import cn.com.qmth.stmms.ms.core.repository.ExamQuestionRepo;
 import cn.com.qmth.stmms.ms.core.vo.Subject;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +31,6 @@ public class ExamQuestionApi {
      */
     @RequestMapping(method = RequestMethod.GET)
     public List<ExamQuestion> list(@RequestParam Long workId, @RequestParam Subject subject){
-        return examQuestionRepo.findByWorkIdAndSubject(workId,subject);
+        return examQuestionRepo.findByWorkIdAndSubjectAndTest(workId,subject, TrialEnum.DEFAULT.getId());
     }
 }