Переглянути джерело

公务用车 时间排序

zhanghao 1 місяць тому
батько
коміт
c450bea0ce

+ 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>