Search in sources :

Example 1 with ApplicationInfoDTO

use of io.kenxue.cicd.coreclient.dto.application.applicationinfo.ApplicationInfoDTO 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)

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 ApplicationInfoDTO (io.kenxue.cicd.coreclient.dto.application.applicationinfo.ApplicationInfoDTO)1 ApplicationInfoDO (io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationInfoDO)1