医案推荐书籍

This commit is contained in:
wuchunlei
2023-11-27 13:50:05 +08:00
parent 5473b21747
commit 351bd76149
5 changed files with 19 additions and 1 deletions

View File

@@ -59,9 +59,10 @@ public class BookMedicalRecordsController {
@RequestMapping("/recommendBookList")
public R recommendBookList(@RequestBody Map<String, Object> params){
List<BookEntity> list = bookMedicalRecordsService.getBooks(params);
int count = bookMedicalRecordsService.getCount((Integer) params.get("userId"));
Page<BookEntity> page = new Page<>();
page.setRecords(list);
page.setTotal(list.size());
page.setTotal(count);
page.setPages((int)Math.ceil(list.size()/page.getSize()));
return R.ok().put("page", page);
}