Browse Source

接口添加返回值

tags/正式版本
王宁 2 years ago
parent
commit
a23b21e334

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/paperstudent/EPaperStudentMapper.java View File

@@ -85,4 +85,6 @@ public interface EPaperStudentMapper extends TkMapper<EPaperStudent> {
85 85
 
86 86
     //考试试卷学生
87 87
     List<ERstudent> listByExamAndSubjectId(@Param("examid") Integer examid,@Param("subjectid") String subjectid);
88
+
89
+    void updateStuStartime(@Param("epsid") Integer epsid,@Param("starttime") Integer starttime);
88 90
 }

+ 2
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EPaperStudentService.java View File

@@ -130,6 +130,7 @@ public class EPaperStudentService {
130 130
             map.put("files",files);
131 131
         }
132 132
 
133
+        ePaperStudentMapper.updateStuStartime(epsid,N_Utils.getSecondTimestamp());
133 134
         map.put("paper",psvo);
134 135
         map.put("questions",questions);
135 136
         return map;
@@ -203,8 +204,8 @@ public class EPaperStudentService {
203 204
             List<Map> files = ePaperFileMapper.listPaperFiles(psvo.getEpid());
204 205
             psvo.setFiles(files);
205 206
         }
206
-
207 207
         psvo.setQtypelist(questions);
208
+        ePaperStudentMapper.updateStuStartime(epsid,N_Utils.getSecondTimestamp());
208 209
         return psvo;
209 210
     }
210 211
 

+ 5
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml View File

@@ -41,7 +41,7 @@
41 41
 
42 42
     <!--获取考试科目时间信息-->
43 43
     <select id="getExamSubjectPaperByEpsid" resultType="java.util.Map">
44
-        select ps.epsid,ps.classid,ps.examid,e.examname,e.examcomm,e.gradeid,es.esid,es.subjectid,es.subjectname,es.sdate,
44
+        select ps.epsid,ps.classid,ps.examid,e.examname,e.examcomm,e.monitored,e.gradeid,es.esid,es.subjectid,es.subjectname,es.sdate,
45 45
                es.begintime,es.endtime,p.ptype,c.classname
46 46
         from e_paper_student ps left join e_base e on ps.examid=e.examid
47 47
         left join e_subject es on ps.esid=es.esid and ps.examid=es.examid
@@ -273,4 +273,8 @@
273 273
             </foreach>
274 274
         </where>
275 275
     </update>
276
+    <!--修改开始考试时间-->
277
+    <update id="updateStuStartime">
278
+        update e_paper_student set starttime=#{starttime} where epsid=#{epsid}
279
+    </update>
276 280
 </mapper>

+ 1
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentQuestionMapper.xml View File

@@ -196,7 +196,7 @@
196 196
         <result column="eptnum" property="eptnum"></result>
197 197
         <result column="eptorder" property="eptorder"></result>
198 198
         <result column="eptscore" property="eptscore"></result>
199
-        <collection property="questions" ofType="java.util.Map" javaType="java.util.Map">
199
+        <collection property="questions" ofType="java.util.Map" javaType="java.util.List">
200 200
             <result column="epsqid" property="epsqid"></result>
201 201
             <result column="score" property="score"></result>
202 202
             <result column="qorder" property="qorder"></result>

+ 4
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionService.java View File

@@ -126,6 +126,10 @@ public class QuestionService {
126 126
         question.setQstate(1);
127 127
         question.setCreatetime(N_Utils.getSecondTimestamp());
128 128
         String questionid = StudyUtil.getId();
129
+        //暂时添加默认值放置从校本题库天理添加试题无qlevel
130
+        if(question.getQlevel() == null){
131
+            question.setQlevel(1);
132
+        }
129 133
         question.setQuestionid(questionid);
130 134
         if (N_Utils.isEmpty(question.getSubjectid())) {//科目为空根据教材id取科目
131 135
             TSubjectBook book = subjectBookMapper.selectByPrimaryKey(question.getLsbid());

Loading…
Cancel
Save