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