正确的思路是应该先对主表进行分页,再关联从表进行查询**

    1. SELECT
    2. p.id,
    3. p.title,
    4. p.journal,
    5. p.issue_date,
    6. u.id AS uid,
    7. u.NAME,
    8. pd.num,
    9. v.STATUS AS v_status,
    10. v.result AS v_result
    11. FROM
    12. ( SELECT id, title, journal, issue_date FROM paper ORDER BY id DESC LIMIT #{offset}, #{size} ) p
    13. LEFT JOIN paper_detail pd ON p.id = pd.paper_id
    14. LEFT JOIN `user` u ON pd.user_id = u.id
    15. LEFT JOIN vote v ON v.pid = p.id