feat(sj_1.1.0-beta1): 任务批次按时间段(createDt)查询
This commit is contained in:
parent
f51404bba0
commit
0a5a8848a1
@ -4,6 +4,8 @@ import com.aizuda.snailjob.server.web.model.base.BaseQueryVO;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author opensnail
|
* @author opensnail
|
||||||
* @date 2023-10-11 22:28:07
|
* @date 2023-10-11 22:28:07
|
||||||
@ -16,4 +18,6 @@ public class JobBatchQueryVO extends BaseQueryVO {
|
|||||||
private String jobName;
|
private String jobName;
|
||||||
private Integer taskBatchStatus;
|
private Integer taskBatchStatus;
|
||||||
private String groupName;
|
private String groupName;
|
||||||
|
private LocalDateTime beginDate;
|
||||||
|
private LocalDateTime endDate;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.aizuda.snailjob.server.web.service.impl;
|
package com.aizuda.snailjob.server.web.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ObjUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.aizuda.snailjob.common.core.constant.SystemConstants;
|
import com.aizuda.snailjob.common.core.constant.SystemConstants;
|
||||||
import com.aizuda.snailjob.common.core.util.JsonUtil;
|
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)
|
.in(CollUtil.isNotEmpty(groupNames), "batch.group_name", groupNames)
|
||||||
.eq(queryVO.getTaskBatchStatus() != null, "batch.task_batch_status", queryVO.getTaskBatchStatus())
|
.eq(queryVO.getTaskBatchStatus() != null, "batch.task_batch_status", queryVO.getTaskBatchStatus())
|
||||||
.likeRight(StrUtil.isNotBlank(queryVO.getJobName()), "job.job_name", queryVO.getJobName())
|
.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)
|
.eq("batch.deleted", 0)
|
||||||
.orderByDesc("batch.id");
|
.orderByDesc("batch.id");
|
||||||
List<JobBatchResponseDO> batchResponseDOList = jobTaskBatchMapper.selectJobBatchPageList(pageDTO, wrapper);
|
List<JobBatchResponseDO> batchResponseDOList = jobTaskBatchMapper.selectJobBatchPageList(pageDTO, wrapper);
|
||||||
|
Loading…
Reference in New Issue
Block a user