mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-26 17:20:52 +00:00
fix: 只推荐有内容的小说
This commit is contained in:
parent
2d218076c4
commit
34d211afbf
@ -35,7 +35,8 @@
|
||||
</select>
|
||||
|
||||
<update id="addVisitCount">
|
||||
update book set visit_count = visit_count + ${visitCount}
|
||||
update book
|
||||
set visit_count = visit_count + ${visitCount}
|
||||
where id = #{bookId}
|
||||
</update>
|
||||
|
||||
@ -43,18 +44,21 @@
|
||||
select id, pic_url, book_name, book_desc
|
||||
from book
|
||||
where cat_id = #{catId}
|
||||
and word_count > 0
|
||||
order by RAND() LIMIT 4
|
||||
</select>
|
||||
|
||||
|
||||
<update id="addCommentCount" parameterType="long">
|
||||
update book set comment_count = comment_count+1
|
||||
update book
|
||||
set comment_count = comment_count + 1
|
||||
where id = #{bookId}
|
||||
</update>
|
||||
|
||||
<select id="queryNetworkPicBooks" resultType="com.java2nb.novel.entity.Book">
|
||||
select
|
||||
id,pic_url from book
|
||||
select id,
|
||||
pic_url
|
||||
from book
|
||||
where pic_url like 'http%'
|
||||
and pic_url not like concat('%', #{localPicPrefix}, '%')
|
||||
limit #{limit}
|
||||
@ -62,7 +66,9 @@
|
||||
|
||||
<select id="selectIdsByScoreAndRandom" parameterType="int" resultType="com.java2nb.novel.entity.Book">
|
||||
|
||||
select id,book_name,author_name,pic_url,book_desc,score from book ORDER BY score,RAND() LIMIT #{limit};
|
||||
select id, book_name, author_name, pic_url, book_desc, score
|
||||
from book
|
||||
ORDER BY score, RAND() LIMIT #{limit};
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user