24282 2 سال پیش
والد
کامیت
046bd4ee9c
1فایلهای تغییر یافته به همراه18 افزوده شده و 0 حذف شده
  1. 18 0
      src/main/java/com/fjhx/email/mapper/xml/MailMapper.xml

+ 18 - 0
src/main/java/com/fjhx/email/mapper/xml/MailMapper.xml

@@ -31,6 +31,20 @@
     </resultMap>
 
     <select id="getMailboxInfoListByUserId" resultMap="getMailboxInfoListByUserIdResultMap">
+        select
+        type,
+        skip,
+        id,
+        mail_user,
+        mail_password,
+        receive_host,
+        receive_port,
+        receive_protocol,
+        folder_id,
+        folder_name,
+        last_message_number,
+        last_received_date
+        from (
         (select 1 type,
         0 skip,
         pm.id,
@@ -84,6 +98,10 @@
         and ef.sync_status = 1
         and ef.del_flag = 0
         )
+        ) t
+        ORDER BY
+        t.id ASC,
+        t.folder_id DESC
     </select>
 
 </mapper>