Explorar el Código

待考试排序

tags/正式版本
王宁 hace 2 años
padre
commit
cf35b50458

+ 2
- 2
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml Ver fichero

@@ -2,7 +2,7 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper">
4 4
 
5
-    <!--学生进行中考试列表-->
5
+    <!--学生进行中考试列表   abs(UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime))-UNIX_TIMESTAMP())-->
6 6
     <select id="listExamPapersForStudent" resultType="java.util.Map">
7 7
         select eps.epsid, es.esid,es.examid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,es.pstate,
8 8
         e.examname,e.gradeid,e.examtype,ep.epid,ep.ptype,eps.sstate
@@ -10,7 +10,7 @@
10 10
          left join e_paper ep on eps.epid=ep.epid left join e_base e on eps.examid=e.examid
11 11
         where e.deleted=1 and e.exammode=1 and eps.studentid=#{studentid} and e.examstate=1
12 12
          GROUP BY eps.epsid
13
-        order by abs(UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime))-UNIX_TIMESTAMP())
13
+        order by UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime)) desc,es.esid desc
14 14
     </select>
15 15
 
16 16
     <resultMap id="examsEndForStu" type="java.util.Map">

Loading…
Cancelar
Guardar