Search in sources :

Example 1 with ApplicationPipelineDO

use of io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationPipelineDO in project cicd-platform by ken-xue.

the class PipelineRepositoryImpl method getByName.

@Override
public Pipeline getByName(String name) {
    QueryWrapper<ApplicationPipelineDO> qw = new QueryWrapper<>();
    qw.eq("pipeline_name", name);
    Pipeline pipeline = applicationPipeline2DOConvector.toDomain(applicationPipelineMapper.selectOne(qw));
    pipeline.deSerializable();
    return pipeline;
}
Also used : ApplicationPipelineDO(io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationPipelineDO) QueryWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper) Pipeline(io.kenxue.cicd.domain.domain.pipeline.Pipeline)

Example 2 with ApplicationPipelineDO

use of io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationPipelineDO in project cicd-platform by ken-xue.

the class PipelineRepositoryImpl method getByUUID.

@Override
public Pipeline getByUUID(String uuid) {
    QueryWrapper<ApplicationPipelineDO> qw = new QueryWrapper<>();
    qw.eq("uuid", uuid);
    Pipeline pipeline = applicationPipeline2DOConvector.toDomain(applicationPipelineMapper.selectOne(qw));
    pipeline.deSerializable();
    return pipeline;
}
Also used : ApplicationPipelineDO(io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationPipelineDO) QueryWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper) Pipeline(io.kenxue.cicd.domain.domain.pipeline.Pipeline)

Example 3 with ApplicationPipelineDO

use of io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationPipelineDO in project cicd-platform by ken-xue.

the class PipelineRepositoryImpl method page.

@Override
public Page<Pipeline> page(PipelinePageQry qry) {
    QueryWrapper<ApplicationPipelineDO> qw = new QueryWrapper<>();
    qw.eq("deleted", false);
    if (Objects.nonNull(qry) && Objects.nonNull(qry.getApplicationUuid()))
        qw.eq("application_uuid", qry.getApplicationUuid());
    if (Objects.nonNull(qry) && Objects.nonNull(qry.getPipelineName()))
        qw.like("pipeline_name", qry.getPipelineName());
    qw.orderBy(true, false, "gmt_create");
    IPage doPage = applicationPipelineMapper.selectPage(new PageDTO(qry.getPageIndex(), qry.getPageSize()), qw);
    return Page.of(doPage.getCurrent(), doPage.getSize(), doPage.getTotal(), applicationPipeline2DOConvector.toDomainList(doPage.getRecords()));
}
Also used : ApplicationPipelineDO(io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationPipelineDO) IPage(com.baomidou.mybatisplus.core.metadata.IPage) PageDTO(com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO) QueryWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper)

Aggregations

QueryWrapper (com.baomidou.mybatisplus.core.conditions.query.QueryWrapper)3 ApplicationPipelineDO (io.kenxue.cicd.infrastructure.repositoryimpl.application.database.dataobject.ApplicationPipelineDO)3 Pipeline (io.kenxue.cicd.domain.domain.pipeline.Pipeline)2 IPage (com.baomidou.mybatisplus.core.metadata.IPage)1 PageDTO (com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO)1