use of com.cas.sim.tis.vo.LibraryPublishForStudent in project TeachingInSimulation by ScOrPiOzzy.
the class PublishListForStudent method reload.
private void reload(Integer pageIndex) {
int pageSize = 10;
PageInfo<LibraryPublishForStudent> pageInfo = SpringUtil.getBean(LibraryPublishAction.class).findPublishForStudent(pageIndex + 1, pageSize, type.getType(), Session.get(Session.KEY_LOGIN_ID));
if (pageInfo == null) {
pagination.setPageCount(0);
table.setItems(null);
table.build();
} else {
pagination.setPageCount((int) pageInfo.getPages());
JSONArray array = new JSONArray();
array.addAll(pageInfo.getList());
table.setItems(array);
table.build();
}
}
use of com.cas.sim.tis.vo.LibraryPublishForStudent in project TeachingInSimulation by ScOrPiOzzy.
the class LibraryPublishServiceImpl method findPublishForStudent.
@Override
public PageInfo<LibraryPublishForStudent> findPublishForStudent(int pageIndex, int pageSize, int type, int creator) {
LibraryPublishMapper publishMapper = (LibraryPublishMapper) mapper;
PageHelper.startPage(pageIndex, pageSize);
List<LibraryPublishForStudent> result = publishMapper.findPublishForStudent(type, creator);
PageInfo<LibraryPublishForStudent> page = new PageInfo<>(result);
LOG.info("成功查找到{}条资源,当前页码{},每页{}条资源,共{}页", result.size(), pageIndex, pageSize, page.getPages());
return page;
}
Aggregations