医案推荐书籍

This commit is contained in:
wuchunlei
2023-11-27 14:20:21 +08:00
parent 351bd76149
commit 218df5ac31

View File

@@ -18,7 +18,7 @@
select b.* from book_medical_records bmr select b.* from book_medical_records bmr
left join book b on bmr.book_id = b.id 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}) 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 GROUP BY bmr.book_id
limit #{page},#{limit} limit #{page},#{limit}
</select> </select>
@@ -28,7 +28,7 @@
select distinct book_id from book_medical_records bmr select distinct book_id from book_medical_records bmr
left join book b on bmr.book_id = b.id 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}) 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) t and bmr.del_flag = 0 and b.del_flag = 0 and b.state = 1) t
</select> </select>
</mapper> </mapper>