use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper 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()));
}
use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper 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()));
}
use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper 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()));
}
use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper 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()));
}
use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper in project cicd-platform by ken-xue.
the class MachineInfoRepositoryImpl method getById.
@Override
public MachineInfo getById(Long id) {
MachineInfoDO machineInfoDO = machineInfoMapper.selectById(id);
machineInfoDO.setGroupList(new ArrayList<>(machineOfGroupMapper.selectList(new QueryWrapper<MachineOfGroupDO>().eq("machine_uuid", machineInfoDO.getUuid())).stream().map(v -> v.getGroupUuid()).collect(Collectors.toSet())));
return machineInfo2DOConvector.toDomain(machineInfoDO);
}
Aggregations