Search in sources :

Example 1 with PageDTO

use of com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO in project cicd-platform by ken-xue.

the class LogRepositoryImpl method page.

@Override
public Page<Log> page(LogPageQry qry) {
    QueryWrapper<LogDO> qw = new QueryWrapper<>();
    IPage doPage = logMapper.selectPage(new PageDTO(qry.getPageIndex(), qry.getPageSize()), qw);
    return Page.of(doPage.getCurrent(), doPage.getSize(), doPage.getTotal(), log2DOConvector.toDomainList(doPage.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) LogDO(io.kenxue.cicd.infrastructure.repositoryimpl.sys.database.dataobject.LogDO)

Example 2 with PageDTO

use of com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO in project cicd-platform 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.kenxue.cicd.infrastructure.repositoryimpl.sys.database.dataobject.UserOfRoleDO)

Example 3 with PageDTO

use of com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO in project cicd-platform by ken-xue.

the class ProjectOfUserRepositoryImpl method page.

@Override
public Page<ProjectOfUser> page(ProjectOfUserPageQry qry) {
    QueryWrapper<ProjectOfUserDO> qw = new QueryWrapper<>();
    IPage doPage = projectOfUserMapper.selectPage(new PageDTO(qry.getPageIndex(), qry.getPageSize()), qw);
    return Page.of(doPage.getCurrent(), doPage.getSize(), doPage.getTotal(), projectOfUser2DOConvector.toDomainList(doPage.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) ProjectOfUserDO(io.kenxue.cicd.infrastructure.repositoryimpl.project.database.dataobject.ProjectOfUserDO)

Example 4 with PageDTO

use of com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO in project cicd-platform by ken-xue.

the class ApplicationInfoRepositoryImpl method page.

@Override
public Page<ApplicationInfo> page(ApplicationInfoPageQry qry) {
    QueryWrapper<ApplicationInfoDO> qw = new QueryWrapper<>();
    ApplicationInfoDTO qryDTO = qry.getApplicationInfoDTO();
    if (Objects.nonNull(qryDTO) && StringUtils.isNotBlank(qryDTO.getApplicationName()))
        qw.like("application_name", qryDTO.getApplicationName());
    if (Objects.nonNull(qryDTO) && StringUtils.isNotBlank(qryDTO.getProjectUuid()))
        qw.eq("project_uuid", qryDTO.getProjectUuid());
    IPage doPage = applicationInfoMapper.selectPage(new PageDTO(qry.getPageIndex(), qry.getPageSize()), qw);
    return Page.of(doPage.getCurrent(), doPage.getSize(), doPage.getTotal(), applicationInfo2DOConvector.toDomainList(doPage.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) ApplicationInfoDO(io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationInfoDO) ApplicationInfoDTO(io.kenxue.cicd.coreclient.dto.application.applicationinfo.ApplicationInfoDTO)

Example 5 with PageDTO

use of com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO in project cicd-platform by ken-xue.

the class MachineInfoRepositoryImpl method page.

@Override
public Page<MachineInfo> page(MachineInfoPageQry qry) {
    PageDTO page = new PageDTO(qry.getPageIndex(), qry.getPageSize());
    List<MachineInfoDO> list = machineInfoMapper.queryPage(page, qry);
    return Page.of(page.getCurrent(), page.getSize(), page.getTotal(), machineInfo2DOConvector.toDomainList(list));
}
Also used : PageDTO(com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO) MachineInfoDO(io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.MachineInfoDO)

Aggregations

PageDTO (com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO)21 QueryWrapper (com.baomidou.mybatisplus.core.conditions.query.QueryWrapper)20 IPage (com.baomidou.mybatisplus.core.metadata.IPage)19 DictionaryDO (io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.DictionaryDO)1 LogDO (io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.LogDO)1 RoleOfMenuDO (io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.RoleOfMenuDO)1 UserOfRoleDO (io.ddd.framework.infrastructure.repositoryimpl.sys.database.dataobject.UserOfRoleDO)1 ApplicationInfoDTO (io.kenxue.cicd.coreclient.dto.application.applicationinfo.ApplicationInfoDTO)1 UserDTO (io.kenxue.cicd.coreclient.dto.sys.user.UserDTO)1 ApplicationConfigDO (io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationConfigDO)1 ApplicationInfoDO (io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationInfoDO)1 ApplicationOfUserDO (io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationOfUserDO)1 ApplicationPipelineDO (io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationPipelineDO)1 MachineInfoDO (io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.MachineInfoDO)1 PipelineNodeDO (io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.PipelineNodeDO)1 MachineGroupDO (io.kenxue.cicd.infrastructure.repositoryimpl.machine.database.dataobject.MachineGroupDO)1 MachineOfGroupDO (io.kenxue.cicd.infrastructure.repositoryimpl.machine.database.dataobject.MachineOfGroupDO)1 JenkinsDO (io.kenxue.cicd.infrastructure.repositoryimpl.middleware.jenkins.database.dataobject.JenkinsDO)1 NodeExecuteLoggerDO (io.kenxue.cicd.infrastructure.repositoryimpl.pipeline.database.dataobject.NodeExecuteLoggerDO)1 PipelineExecuteLoggerDO (io.kenxue.cicd.infrastructure.repositoryimpl.pipeline.database.dataobject.PipelineExecuteLoggerDO)1