瀏覽代碼

公务用车 时间排序

zhanghao 3 月之前
父節點
當前提交
c450bea0ce
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      project-zcustom/src/main/resources/mapper/zcustom/car/PlatCarMapper.xml

+ 4 - 1
project-zcustom/src/main/resources/mapper/zcustom/car/PlatCarMapper.xml

@@ -105,7 +105,9 @@
         WHERE
             flag = #{arg1}
         <if test="arg0 != '10001'">AND b.app_org = #{arg0}</if>
-            LIMIT #{arg2} OFFSET #{arg3}
+        <if test="arg1 == 0">ORDER BY org_date DESC</if>
+        <if test="arg1 == 1">ORDER BY handle_date DESC</if>
+        LIMIT #{arg2} OFFSET #{arg3}
     </select>
 
     <select id="getCarDetailNum" resultType="int">
@@ -150,6 +152,7 @@
         WHERE
             alert_type = #{arg1}
         <if test="arg0 != '10001'">AND b.app_org = #{arg0}</if>
+        ORDER BY start_time DESC
             LIMIT #{arg2} OFFSET #{arg3}
     </select>