Sfoglia il codice sorgente

公出列表排序修改

anderx 3 anni fa
parent
commit
94b794b4e3

+ 8 - 3
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -555,9 +555,14 @@ a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_na
 	<if test="clockIn !=null">
 	and a.clock_in = #{clockIn}
 	</if>
-    ORDER BY (case when a.status=1 then 1 when a.status=2 then 2 when a.status=3 then 5
-    when a.status=0 then 3 when a.status=4 then 4
-    else 0 end),a.status ,a.create_time desc
+    <if test="type==2">
+      ORDER BY a.create_time desc
+    </if>
+    <if test="type!=2">
+      ORDER BY (case when a.status=1 then 1 when a.status=2 then 2 when a.status=3 then 5
+      when a.status=0 then 3 when a.status=4 then 4
+      else 0 end),a.status ,a.create_time desc
+    </if>
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>