分页修改
This commit is contained in:
parent
90cb7a430f
commit
4487f4e97a
@ -2,9 +2,10 @@ package cd.casic.ci.process.dal.req.history;
|
||||
|
||||
import cd.casic.framework.commons.pojo.PageParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PipelineHistoryQueryReq {
|
||||
public class PipelineHistoryQueryReq extends PageParam{
|
||||
private String pipelineId;
|
||||
private PageParam pageParam;
|
||||
}
|
||||
|
@ -63,7 +63,6 @@ public abstract class BaseWorker implements Runnable{
|
||||
BaseRunContext context = contextManager.getContext(contextKey);
|
||||
if (context instanceof TaskRunContext taskRunContext){
|
||||
try {
|
||||
taskRunContext.changeContextState(ContextStateEnum.READY);
|
||||
Map<String, Object> globalVariables = context.getGlobalVariables();
|
||||
Object fromError = globalVariables.get(PipelineBehaviorConstant.PIPELINE_EXECUTE_FROM_ERROR);
|
||||
if (Boolean.TRUE.equals(fromError)&&ContextStateEnum.HAPPY_ENDING.getCode().equals(taskRunContext.getState().get())) {
|
||||
@ -73,6 +72,7 @@ public abstract class BaseWorker implements Runnable{
|
||||
taskRunContext.changeContextState(ContextStateEnum.SUSPEND);
|
||||
passableWorker.waitForPermission();
|
||||
} else {
|
||||
taskRunContext.changeContextState(ContextStateEnum.READY);
|
||||
taskRunContext.changeContextState(ContextStateEnum.RUNNING);
|
||||
}
|
||||
execute(taskRunContext);
|
||||
|
@ -8,6 +8,7 @@ import cd.casic.ci.process.process.dataObject.history.PipPipelineHisInstance;
|
||||
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
|
||||
import cd.casic.ci.process.process.service.history.PipelineHistoryService;
|
||||
import cd.casic.ci.process.process.service.pipeline.PipelineService;
|
||||
import cd.casic.framework.commons.pojo.PageParam;
|
||||
import cd.casic.framework.commons.pojo.PageResult;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -25,7 +26,8 @@ public class PipelineHistoryServiceImpl extends ServiceImpl<PipPipelineHisInstan
|
||||
public PageResult<PipPipelineHisInstance> getPageByPipelineId(PipelineHistoryQueryReq req) {
|
||||
LambdaQueryWrapper<PipPipelineHisInstance> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PipPipelineHisInstance::getPipelineId,req.getPipelineId());
|
||||
Page<PipPipelineHisInstance> page = pipelineHisInstanceDao.selectPage(new Page<PipPipelineHisInstance>(), wrapper);
|
||||
wrapper.orderByDesc(PipPipelineHisInstance::getCreateTime);
|
||||
Page<PipPipelineHisInstance> page = pipelineHisInstanceDao.selectPage(new Page<>(req.getPageNo(),req.getPageSize()), wrapper);
|
||||
return new PageResult<PipPipelineHisInstance>(page.getRecords(), page.getTotal(), page.getCurrent(), page.getSize());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user