Search in sources :

Example 1 with UserOfRoleDO

use of io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.UserOfRoleDO in project ddd-framework by ken-xue.

the class UserOfRoleRepositoryImpl method page.

@Override
public Page<UserOfRole> page(UserOfRolePageQry qry) {
    QueryWrapper<UserOfRoleDO> wp = new QueryWrapper<>();
    // 未删除
    wp.eq("deleted", 0);
    IPage doPage = new PageDTO(qry.getPageIndex(), qry.getPageSize());
    IPage<UserOfRoleDO> page = userOfRoleMapper.selectPage(doPage, wp);
    return Page.of(page.getCurrent(), page.getSize(), page.getTotal(), userOfRole2DOConvector.toDomainList(page.getRecords()));
}
Also used : IPage(com.baomidou.mybatisplus.core.metadata.IPage) PageDTO(com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO) QueryWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper) UserOfRoleDO(io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.UserOfRoleDO)

Aggregations

QueryWrapper (com.baomidou.mybatisplus.core.conditions.query.QueryWrapper)1 IPage (com.baomidou.mybatisplus.core.metadata.IPage)1 PageDTO (com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO)1 UserOfRoleDO (io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.UserOfRoleDO)1