医案-推荐书籍

This commit is contained in:
wuchunlei
2023-11-27 16:56:36 +08:00
parent b1224eb9f4
commit d9c7a1c6d2

View File

@@ -58,12 +58,13 @@ public class BookMedicalRecordsController {
// page.setPages((int)Math.ceil(list.size()/page.getSize()));
// return R.ok().put("page", page);
MPJLambdaWrapper<BookEntity> wrapper = new MPJLambdaWrapper<>();
String exsql = "SELECT 1 FROM book_medical_records bmr WHERE bmr.book_id = id";
String exsql = "SELECT 1 FROM book_medical_records bmr WHERE bmr.book_id = id and bmr.del_flag = 0 ";
String notsql = "select 1 from user_ebook_buy b where b.book_id = id and user_id = "+params.get("userId");
wrapper.selectAll(BookEntity.class);
wrapper.exists(exsql);
wrapper.notExists(notsql);
wrapper.eq("state",1);
wrapper.eq("del_flag",0);
IPage<BookEntity> page = bookService.page(
new Query<BookEntity>().getPage(params),wrapper);
return R.ok().put("page", page);