Browse Source

排序修改

wangfeng 4 năm trước cách đây
mục cha
commit
240d5f813a
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/main/resources/mapper/PlanMapper.xml

+ 2 - 2
src/main/resources/mapper/PlanMapper.xml

@@ -33,7 +33,7 @@
         FROM
         tran_plan u
         LEFT JOIN tran_plan_detail pd ON pd.plan_id = u.id AND pd.status = 1 AND pd.is_deleted = 'N'
-        AND pd.parent_id = - 1
+        AND pd.parent_id = -1
         WHERE
         u.is_deleted = 'N'
         <if test="hospitalId !=null">
@@ -50,6 +50,6 @@
             AND u.plan_status = #{planStatus}
         </if>
         GROUP BY u.id
-        ORDER BY gmtCreate DESC
+        ORDER BY planStatus DESC , gmtCreate DESC
     </select>
 </mapper>