医案推荐图书

This commit is contained in:
wuchunlei
2023-11-27 10:36:22 +08:00
parent d33f24113c
commit 959277de6f
5 changed files with 69 additions and 1 deletions

View File

@@ -14,5 +14,12 @@
<result property="delFlag" column="del_flag"/>
</resultMap>
<select id="getBooks" parameterType="int" resultType="com.peanut.modules.book.entity.BookEntity">
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
GROUP BY bmr.book_id
</select>
</mapper>