feat(sj_1.1.0-beta1): 任务批次按时间段(createDt)查询

This commit is contained in:
dhb52 2024-06-16 10:46:23 +08:00
parent f51404bba0
commit 0a5a8848a1
2 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,8 @@ import com.aizuda.snailjob.server.web.model.base.BaseQueryVO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* @author opensnail
* @date 2023-10-11 22:28:07
@ -16,4 +18,6 @@ public class JobBatchQueryVO extends BaseQueryVO {
private String jobName;
private Integer taskBatchStatus;
private String groupName;
private LocalDateTime beginDate;
private LocalDateTime endDate;
}

View File

@ -1,6 +1,7 @@
package com.aizuda.snailjob.server.web.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil;
import com.aizuda.snailjob.common.core.constant.SystemConstants;
import com.aizuda.snailjob.common.core.util.JsonUtil;
@ -65,6 +66,8 @@ public class JobBatchServiceImpl implements JobBatchService {
.in(CollUtil.isNotEmpty(groupNames), "batch.group_name", groupNames)
.eq(queryVO.getTaskBatchStatus() != null, "batch.task_batch_status", queryVO.getTaskBatchStatus())
.likeRight(StrUtil.isNotBlank(queryVO.getJobName()), "job.job_name", queryVO.getJobName())
.between(ObjUtil.isAllNotEmpty(queryVO.getBeginDate(), queryVO.getEndDate()),
"batch.create_dt", queryVO.getBeginDate(), queryVO.getEndDate())
.eq("batch.deleted", 0)
.orderByDesc("batch.id");
List<JobBatchResponseDO> batchResponseDOList = jobTaskBatchMapper.selectJobBatchPageList(pageDTO, wrapper);