feat(sj_1.1.0-beta1): 工作流批次、重试批次、重试日志添加时间筛选
This commit is contained in:
parent
ca73d5f923
commit
5d24bf4838
@ -3,6 +3,8 @@ package com.aizuda.snailjob.server.web.model.request;
|
||||
import com.aizuda.snailjob.server.web.model.base.BaseQueryVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author: opensnail
|
||||
* @date : 2022-02-28 09:45
|
||||
@ -14,4 +16,6 @@ public class RetryDeadLetterQueryVO extends BaseQueryVO {
|
||||
private String bizNo;
|
||||
private String idempotentId;
|
||||
private String uniqueId;
|
||||
private LocalDateTime beginDate;
|
||||
private LocalDateTime endDate;
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package com.aizuda.snailjob.server.web.model.request;
|
||||
import com.aizuda.snailjob.server.web.model.base.BaseQueryVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author: opensnail
|
||||
* @date : 2022-02-28 09:08
|
||||
@ -21,4 +23,8 @@ public class RetryTaskLogQueryVO extends BaseQueryVO {
|
||||
private String uniqueId;
|
||||
|
||||
private Integer retryStatus;
|
||||
|
||||
private LocalDateTime beginDate;
|
||||
|
||||
private LocalDateTime endDate;
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import com.aizuda.snailjob.server.web.model.base.BaseQueryVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author xiaowoniu
|
||||
* @date 2023-12-23 17:49:59
|
||||
@ -16,4 +18,6 @@ public class WorkflowBatchQueryVO extends BaseQueryVO {
|
||||
private String workflowName;
|
||||
private Long workflowId;
|
||||
private Integer taskBatchStatus;
|
||||
private LocalDateTime beginDate;
|
||||
private LocalDateTime endDate;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.aizuda.snailjob.server.web.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.aizuda.snailjob.common.core.enums.RetryStatusEnum;
|
||||
import com.aizuda.snailjob.common.core.util.StreamUtils;
|
||||
@ -73,6 +74,8 @@ public class RetryDeadLetterServiceImpl implements RetryDeadLetterService {
|
||||
.eq(StrUtil.isNotBlank(queryVO.getBizNo()), RetryDeadLetter::getBizNo, queryVO.getBizNo())
|
||||
.eq(StrUtil.isNotBlank(queryVO.getIdempotentId()), RetryDeadLetter::getIdempotentId, queryVO.getIdempotentId())
|
||||
.eq(StrUtil.isNotBlank(queryVO.getUniqueId()), RetryDeadLetter::getUniqueId, queryVO.getUniqueId())
|
||||
.between(ObjUtil.isAllNotEmpty(queryVO.getBeginDate(), queryVO.getEndDate()),
|
||||
RetryDeadLetter::getCreateDt, queryVO.getBeginDate(), queryVO.getEndDate())
|
||||
.orderByDesc(RetryDeadLetter::getId));
|
||||
|
||||
return new PageResult<>(retryDeadLetterPageDTO,
|
||||
|
@ -2,6 +2,7 @@ package com.aizuda.snailjob.server.web.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.aizuda.snailjob.common.core.enums.RetryStatusEnum;
|
||||
import com.aizuda.snailjob.common.core.util.JsonUtil;
|
||||
@ -58,6 +59,8 @@ public class RetryTaskLogServiceImpl implements RetryTaskLogService {
|
||||
.eq(StrUtil.isNotBlank(queryVO.getUniqueId()), RetryTaskLog::getUniqueId, queryVO.getUniqueId())
|
||||
.eq(StrUtil.isNotBlank(queryVO.getIdempotentId()), RetryTaskLog::getIdempotentId, queryVO.getIdempotentId())
|
||||
.eq(queryVO.getRetryStatus() != null, RetryTaskLog::getRetryStatus, queryVO.getRetryStatus())
|
||||
.between(ObjUtil.isAllNotEmpty(queryVO.getBeginDate(), queryVO.getEndDate()),
|
||||
RetryTaskLog::getCreateDt, queryVO.getBeginDate(), queryVO.getEndDate())
|
||||
.select(RetryTaskLog::getGroupName, RetryTaskLog::getId,
|
||||
RetryTaskLog::getSceneName,
|
||||
RetryTaskLog::getIdempotentId, RetryTaskLog::getBizNo, RetryTaskLog::getRetryStatus,
|
||||
|
@ -2,6 +2,7 @@ package com.aizuda.snailjob.server.web.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
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.enums.JobOperationReasonEnum;
|
||||
@ -59,6 +60,11 @@ public class WorkflowBatchServiceImpl implements WorkflowBatchService {
|
||||
private final WorkflowBatchHandler workflowBatchHandler;
|
||||
private final JobMapper jobMapper;
|
||||
|
||||
private static boolean isNoOperation(JobTaskBatch i) {
|
||||
return JobOperationReasonEnum.WORKFLOW_SUCCESSOR_SKIP_EXECUTION.contains(i.getOperationReason())
|
||||
|| i.getTaskBatchStatus() == JobTaskBatchStatusEnum.STOP.getStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<List<WorkflowBatchResponseVO>> listPage(WorkflowBatchQueryVO queryVO) {
|
||||
PageDTO<JobTaskBatch> pageDTO = new PageDTO<>(queryVO.getPage(), queryVO.getSize());
|
||||
@ -77,6 +83,8 @@ public class WorkflowBatchServiceImpl implements WorkflowBatchService {
|
||||
.in(CollUtil.isNotEmpty(groupNames), "batch.group_name", groupNames)
|
||||
.eq(queryVO.getTaskBatchStatus() != null, "batch.task_batch_status", queryVO.getTaskBatchStatus())
|
||||
.likeRight(StrUtil.isNotBlank(queryVO.getWorkflowName()), "flow.workflow_name", queryVO.getWorkflowName())
|
||||
.between(ObjUtil.isAllNotEmpty(queryVO.getBeginDate(), queryVO.getEndDate()),
|
||||
"batch.create_dt", queryVO.getBeginDate(), queryVO.getEndDate())
|
||||
.eq("batch.deleted", 0)
|
||||
.orderByDesc("batch.id");
|
||||
List<WorkflowBatchResponseDO> batchResponseDOList = workflowTaskBatchMapper.selectWorkflowBatchPageList(pageDTO, wrapper);
|
||||
@ -202,9 +210,4 @@ public class WorkflowBatchServiceImpl implements WorkflowBatchService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
private static boolean isNoOperation(JobTaskBatch i) {
|
||||
return JobOperationReasonEnum.WORKFLOW_SUCCESSOR_SKIP_EXECUTION.contains(i.getOperationReason())
|
||||
|| i.getTaskBatchStatus() == JobTaskBatchStatusEnum.STOP.getStatus();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user