copyStage接口
This commit is contained in:
parent
8eb38f3c30
commit
f7533f9ff3
@ -7,6 +7,7 @@ import cd.casic.ci.common.pipeline.resp.stage.StageResp;
|
||||
import cd.casic.ci.process.process.dataObject.stage.PipStage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
@ -81,6 +82,6 @@ public interface StageService extends IService<PipStage> {
|
||||
void deleteStages(String stageId);
|
||||
|
||||
|
||||
void createStagesOrTaskList(@Valid @NotNull List<StageCreateReq> stageList);
|
||||
void copyStage(@NotEmpty String stageId);
|
||||
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ public class StageServiceImpl extends ServiceImpl<PipStageDao, PipStage> impleme
|
||||
|
||||
@Override
|
||||
public void deleteAllStagesOrTask(String pipelineId) {
|
||||
|
||||
// TODO 删除流水线,不知道要不要
|
||||
}
|
||||
|
||||
private List<PipStage> getPipStageList(PipStage pipStage){
|
||||
@ -301,12 +301,9 @@ public class StageServiceImpl extends ServiceImpl<PipStageDao, PipStage> impleme
|
||||
stageDao.deleteById(stageId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void createStagesOrTaskList(List<StageCreateReq> stageList) {
|
||||
if (!ObjectUtils.isEmpty(stageList)){
|
||||
stageList.forEach(this::createStagesOrTask);
|
||||
}
|
||||
public void copyStage(String stageId) {
|
||||
// 查询当前stage(阶段下所有)
|
||||
}
|
||||
|
||||
public List<PipStage> findOtherStageNoTask(String stagesId){
|
||||
|
@ -12,6 +12,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -84,7 +85,13 @@ public class StageController {
|
||||
stageService.deleteStagesOrTask(taskId);
|
||||
return CommonResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制stage节点
|
||||
* */
|
||||
@PostMapping(path="/copyStage")
|
||||
public CommonResult<Void> copyStage(@NotEmpty String stageId){
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user