Search in sources :

Example 1 with ClassMapper

use of com.cas.sim.tis.mapper.ClassMapper in project TeachingInSimulation by ScOrPiOzzy.

the class ClassServiceImpl method saveClasses.

@Override
public void saveClasses(List<ClassInfo> infos, Integer creator) {
    ClassMapper classMapper = (ClassMapper) mapper;
    classMapper.insertClasses(infos, creator);
}
Also used : ClassMapper(com.cas.sim.tis.mapper.ClassMapper)

Example 2 with ClassMapper

use of com.cas.sim.tis.mapper.ClassMapper in project TeachingInSimulation by ScOrPiOzzy.

the class ClassServiceImpl method findClasses.

@Override
public PageInfo<Class> findClasses(int pageIndex, int pageSize) {
    ClassMapper classMapper = (ClassMapper) mapper;
    PageHelper.startPage(pageIndex, pageSize);
    List<Class> result = classMapper.findClasses();
    PageInfo<Class> page = new PageInfo<>(result);
    LOG.info("成功查找到{}条资源,当前页码{},每页{}条资源,共{}页", page.getTotal(), pageIndex, pageSize, page.getPages());
    return page;
}
Also used : ClassMapper(com.cas.sim.tis.mapper.ClassMapper) PageInfo(com.github.pagehelper.PageInfo) Class(com.cas.sim.tis.entity.Class)

Aggregations

ClassMapper (com.cas.sim.tis.mapper.ClassMapper)2 Class (com.cas.sim.tis.entity.Class)1 PageInfo (com.github.pagehelper.PageInfo)1