diff --git a/novel-front/src/main/resources/mybatis/mapping/BookMapper.xml b/novel-front/src/main/resources/mybatis/mapping/BookMapper.xml index dae223a..b020f40 100644 --- a/novel-front/src/main/resources/mybatis/mapping/BookMapper.xml +++ b/novel-front/src/main/resources/mybatis/mapping/BookMapper.xml @@ -34,35 +34,41 @@ - - update book set visit_count = visit_count + ${visitCount} + + update book + set visit_count = visit_count + ${visitCount} where id = #{bookId} - update book set comment_count = comment_count+1 - where id = #{bookId} + update book + set comment_count = comment_count + 1 + where id = #{bookId} + select id, book_name, author_name, pic_url, book_desc, score + from book + ORDER BY score, RAND() LIMIT #{limit}; + \ No newline at end of file