Search in sources :

Example 1 with RoleOfMenuDO

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

the class RoleOfMenuRepositoryImpl method getById.

public RoleOfMenu getById(long id) {
    RoleOfMenuDO roleOfMenuDO = roleOfMenuMapper.selectById(id);
    RoleOfMenu roleOfMenu = new RoleOfMenu();
    BeanUtils.copyProperties(roleOfMenuDO, roleOfMenu);
    return roleOfMenu;
}
Also used : RoleOfMenuDO(io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.RoleOfMenuDO) RoleOfMenu(io.ddd.framework.domain.domain.sys.RoleOfMenu)

Example 2 with RoleOfMenuDO

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

the class RoleOfMenuRepositoryImpl method page.

@Override
public Page<RoleOfMenu> page(RoleOfMenuPageQry qry) {
    QueryWrapper<RoleOfMenuDO> wp = new QueryWrapper<>();
    // 未删除
    wp.eq("deleted", 0);
    IPage doPage = new PageDTO(qry.getPageIndex(), qry.getPageSize());
    IPage<RoleOfMenuDO> page = roleOfMenuMapper.selectPage(doPage, wp);
    return Page.of(page.getCurrent(), page.getSize(), page.getTotal(), roleOfMenu2DOConvector.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) RoleOfMenuDO(io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.RoleOfMenuDO)

Aggregations

RoleOfMenuDO (io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.RoleOfMenuDO)2 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 RoleOfMenu (io.ddd.framework.domain.domain.sys.RoleOfMenu)1