Merge remote-tracking branch 'origin/zcc'

This commit is contained in:
wangjinlei
2023-11-27 15:37:51 +08:00
5 changed files with 25 additions and 18 deletions

View File

@@ -18,9 +18,17 @@
select b.* from book_medical_records bmr
left join book b on bmr.book_id = b.id
where bmr.book_id not in (select book_id from user_ebook_buy where user_id = #{userId})
and b.del_flag = 0 and b.state = 1
and bmr.del_flag = 0 and b.del_flag = 0 and b.state = 1
GROUP BY bmr.book_id
limit #{page},#{limit}
</select>
<select id="getCount" parameterType="int" resultType="int">
select count(*) from (
select distinct book_id from book_medical_records bmr
left join book b on bmr.book_id = b.id
where bmr.book_id not in (select book_id from user_ebook_buy where user_id = #{userId})
and bmr.del_flag = 0 and b.del_flag = 0 and b.state = 1) t
</select>
</mapper>