From 34d211afbf7429807eef56b06b916fa5204deff3 Mon Sep 17 00:00:00 2001 From: xiongxiaoyang <1179705413@qq.com> Date: Wed, 21 Feb 2024 19:27:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=AA=E6=8E=A8=E8=8D=90=E6=9C=89?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E7=9A=84=E5=B0=8F=E8=AF=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mybatis/mapping/BookMapper.xml | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) 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