Search in sources :

Example 1 with JenkinsDO

use of io.kenxue.cicd.infrastructure.repositoryimpl.middleware.jenkins.database.dataobject.JenkinsDO in project cicd-platform by ken-xue.

the class JenkinsRepositoryImpl method page.

@Override
public Page<Jenkins> page(JenkinsPageQry qry) {
    QueryWrapper<JenkinsDO> qw = new QueryWrapper<>();
    qw.eq("deleted", false);
    if (Objects.nonNull(qry.getJenkinsDTO()) && Objects.nonNull(qry.getJenkinsDTO().getName()))
        qw.like("name", qry.getJenkinsDTO().getName());
    IPage doPage = jenkinsMapper.selectPage(new PageDTO(qry.getPageIndex(), qry.getPageSize()), qw);
    return Page.of(doPage.getCurrent(), doPage.getSize(), doPage.getTotal(), jenkins2DOConvector.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) JenkinsDO(io.kenxue.cicd.infrastructure.repositoryimpl.middleware.jenkins.database.dataobject.JenkinsDO)

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 JenkinsDO (io.kenxue.cicd.infrastructure.repositoryimpl.middleware.jenkins.database.dataobject.JenkinsDO)1