医案推荐图书

This commit is contained in:
wuchunlei
2023-11-27 11:04:05 +08:00
parent 959277de6f
commit a307ce1881
5 changed files with 14 additions and 8 deletions

View File

@@ -12,6 +12,6 @@ import java.util.Map;
public interface BookMedicalRecordsService extends IService<BookMedicalRecordsEntity> {
List<BookEntity> getBooks(Integer userId);
List<BookEntity> getBooks(Map<String, Object> params);
}

View File

@@ -24,7 +24,10 @@ public class BookMedicalRecordsServiceImpl extends ServiceImpl<BookMedicalRecord
private BookMedicalRecordsDao dao;
@Override
public List<BookEntity> getBooks(Integer userId) {
return dao.getBooks(userId);
public List<BookEntity> getBooks(Map<String, Object> params) {
int page = Integer.parseInt(params.get("page").toString());
int limit = Integer.parseInt(params.get("limit").toString());
return dao.getBooks((page-1)*limit,limit
,(Integer)params.get("userId"));
}
}