0529 ljc
This commit is contained in:
parent
6420206095
commit
7b09fcdb01
@ -2,8 +2,6 @@ package cd.casic.ci.common.pipeline.req.resource;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ResourceReq {
|
||||
/**
|
||||
@ -110,18 +108,4 @@ public class ResourceReq {
|
||||
* 流水线id
|
||||
*/
|
||||
private String pipelineId;
|
||||
|
||||
/**
|
||||
* 创建人用户id
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package cd.casic.ci.common.pipeline.req.template;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author HopeLi
|
||||
* @version v1.0
|
||||
* @ClassName TemplateCreateReq
|
||||
* @Date: 2025/5/29 10:41
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class TemplateCreateReq{
|
||||
}
|
@ -7,6 +7,8 @@ import cd.casic.ci.common.pipeline.req.pipeline.PipelineUpdateReq;
|
||||
import cd.casic.ci.common.pipeline.resp.context.TreeRunContextResp;
|
||||
import cd.casic.ci.common.pipeline.resp.pipeline.PipelineFindResp;
|
||||
import cd.casic.ci.common.pipeline.resp.stage.StageResp;
|
||||
import cd.casic.ci.common.pipeline.resp.template.TemplateFindResp;
|
||||
import cd.casic.ci.common.pipeline.resp.template.TemplateStageResp;
|
||||
import cd.casic.ci.common.pipeline.utils.PageResult;
|
||||
import cd.casic.ci.process.engine.manager.RunContextManager;
|
||||
import cd.casic.ci.process.engine.runContext.BaseRunContext;
|
||||
@ -24,6 +26,7 @@ import cd.casic.ci.process.process.service.pipeline.PipelineService;
|
||||
import cd.casic.ci.process.process.service.resource.impl.ResourceServiceImpl;
|
||||
import cd.casic.ci.process.process.service.stage.impl.StageServiceImpl;
|
||||
import cd.casic.ci.process.process.service.task.impl.TaskServiceImpl;
|
||||
import cd.casic.ci.process.process.service.template.impl.TemplateManagerServiceImpl;
|
||||
import cd.casic.framework.commons.exception.ServiceException;
|
||||
import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants;
|
||||
import cd.casic.framework.commons.util.object.BeanUtils;
|
||||
@ -80,10 +83,17 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
||||
private AdminUserServiceImpl adminUserService;
|
||||
@Resource
|
||||
private RunContextManager contextManager;
|
||||
|
||||
@Resource
|
||||
private TemplateManagerServiceImpl templateService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String createPipeline(PipelineCreateReq pipelineReq) {
|
||||
List<PipStage> pipStageList = new ArrayList<>(0);
|
||||
List<PipTask> pipTaskList = new ArrayList<>(0);
|
||||
|
||||
Map<PipStage,Map<PipStage,List<PipTask>>> templateCopyPipelineMap = new HashMap<>();
|
||||
|
||||
PipPipeline pipeline = new PipPipeline();
|
||||
BeanUtils.copyProperties(pipelineReq, pipeline);
|
||||
@ -111,159 +121,91 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
||||
}
|
||||
|
||||
this.save(pipeline);
|
||||
|
||||
//根据模板ID初始化
|
||||
if (!ObjectUtils.isEmpty(pipelineReq.getTemplateId())){
|
||||
TemplateFindResp template = templateService.findTemplateById(pipelineReq.getTemplateId());
|
||||
|
||||
//TODO 根据模板覆写对应的阶段信息以及节点信息
|
||||
// List<StageReq> stageReqList = templateService.findStageById(pipelineReq.getTemplateId());
|
||||
// stageReqList.forEach(o->{
|
||||
// o.setPipelineId(pipeline.getId());
|
||||
// });
|
||||
//新增初始阶段,无串行并行任务
|
||||
PipStage stageReq1 = new PipStage();
|
||||
stageReq1.setPipelineId(pipeline.getId());
|
||||
stageReq1.setStageName("阶段-1");
|
||||
stageReq1.setCreateTime(LocalDateTime.now());
|
||||
stageReq1.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
stageReq1.setStageSort(1);
|
||||
stageReq1.setParentId("-1");
|
||||
stageReq1.setCode(true);
|
||||
stageService.save(stageReq1);
|
||||
if (!ObjectUtils.isEmpty(template)){
|
||||
|
||||
PipStage childStage1 = new PipStage();
|
||||
childStage1.setPipelineId(pipeline.getId());
|
||||
childStage1.setStageName("源码");
|
||||
childStage1.setCreateTime(LocalDateTime.now());
|
||||
childStage1.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
childStage1.setStageSort(1);
|
||||
childStage1.setCode(false);
|
||||
childStage1.setParentId(stageReq1.getId());
|
||||
stageService.save(childStage1);
|
||||
//新增阶段数据
|
||||
List<TemplateStageResp> stageList = template.getStageList();
|
||||
stageList.forEach(o->{
|
||||
PipStage pipStage = new PipStage();
|
||||
BeanUtils.copyProperties(o,pipStage);
|
||||
|
||||
PipTask childTask11 = new PipTask();
|
||||
childTask11.setCreateTime(LocalDateTime.now());
|
||||
childTask11.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
childTask11.setTaskName("目标");
|
||||
childTask11.setPipelineId(pipeline.getId());
|
||||
childTask11.setTaskType("CODE");
|
||||
childTask11.setTaskSort(1);
|
||||
childTask11.setStageId(childStage1.getId());
|
||||
taskService.save(childTask11);
|
||||
pipStage.setId(null);
|
||||
pipStage.setPipelineId(pipeline.getId());
|
||||
pipStage.setCreateTime(LocalDateTime.now());
|
||||
pipStage.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
if (o.isCode()){
|
||||
pipStage.setCode(false);
|
||||
}else {
|
||||
pipStage.setCode(true);
|
||||
}
|
||||
pipStageList.add(pipStage);
|
||||
|
||||
//新增第二个阶段,包含串行和并行任务
|
||||
PipStage stageReq2 = new PipStage();
|
||||
stageReq2.setPipelineId(pipeline.getId());
|
||||
stageReq2.setStageName("阶段-2");
|
||||
stageReq2.setCreateTime(LocalDateTime.now());
|
||||
stageReq2.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
stageReq2.setStageSort(2);
|
||||
stageReq2.setParentId("-1");
|
||||
stageReq2.setCode(true);
|
||||
stageService.save(stageReq2);
|
||||
List<TemplateStageResp> childStageList = o.getStageList();
|
||||
if (!CollectionUtils.isEmpty(childStageList)){
|
||||
//则代表大阶段下存在阶段子节点
|
||||
childStageList.forEach(j->{
|
||||
PipStage childStage = new PipStage();
|
||||
BeanUtils.copyProperties(j,childStage);
|
||||
Map<PipStage,List<PipTask>> stageTaskMap = new HashMap<>();
|
||||
|
||||
//新增并行阶段
|
||||
PipStage childStage21 = new PipStage();
|
||||
childStage21.setStageName("并行阶段-2-1");
|
||||
childStage21.setPipelineId(pipeline.getId());
|
||||
childStage21.setCreateTime(LocalDateTime.now());
|
||||
childStage21.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
childStage21.setStageSort(1);
|
||||
childStage21.setCode(false);
|
||||
childStage21.setParentId(stageReq2.getId());
|
||||
stageService.save(childStage21);
|
||||
childStage.setId(null);
|
||||
childStage.setPipelineId(pipeline.getId());
|
||||
childStage.setCreateTime(LocalDateTime.now());
|
||||
childStage.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
if (j.isCode()){
|
||||
childStage.setCode(false);
|
||||
}else {
|
||||
childStage.setCode(true);
|
||||
}
|
||||
|
||||
//新增串行阶段
|
||||
PipTask childTask21 = new PipTask();
|
||||
childTask21.setPipelineId(pipeline.getId());
|
||||
childTask21.setTaskName("串行任务-2-1");
|
||||
childTask21.setCreateTime(LocalDateTime.now());
|
||||
childTask21.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
childTask21.setTaskType("TEST_CASE_GENERATION");
|
||||
childTask21.setTaskSort(1);
|
||||
childTask21.setStageId(childStage21.getId());
|
||||
taskService.save(childTask21);
|
||||
pipStageList.add(childStage);
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// PipStage childStage22 = new PipStage();
|
||||
// childStage22.setStageName("并行阶段-2-2");
|
||||
// childStage22.setPipelineId(pipeline.getId());
|
||||
// childStage22.setCreateTime(LocalDateTime.now());
|
||||
// childStage22.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
// childStage22.setStageSort(2);
|
||||
// childStage22.setCode(false);
|
||||
// childStage22.setParentId(stageReq2.getId());
|
||||
// stageService.save(childStage22);
|
||||
//
|
||||
// PipTask childTask22 = new PipTask();
|
||||
// childTask22.setCreateTime(LocalDateTime.now());
|
||||
// childTask22.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
// childTask22.setTaskName("串行任务-2-2");
|
||||
// childTask22.setPipelineId(pipeline.getId());
|
||||
// childTask22.setTaskType("test");
|
||||
// childTask22.setTaskSort(2);
|
||||
// childTask22.setStageId(childStage22.getId());
|
||||
// taskService.save(childTask22);
|
||||
if (!CollectionUtils.isEmpty(j.getTaskValues())){
|
||||
List<PipTask> taskList = new ArrayList<>(0);
|
||||
j.getTaskValues().forEach(k->{
|
||||
PipTask pipTask = new PipTask();
|
||||
BeanUtils.copyProperties(k,pipTask);
|
||||
pipTask.setId(null);
|
||||
pipTask.setPipelineId(pipeline.getId());
|
||||
pipTask.setCreateTime(LocalDateTime.now());
|
||||
pipTask.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
taskList.add(pipTask);
|
||||
});
|
||||
stageTaskMap.put(childStage,taskList);
|
||||
pipTaskList.addAll(taskList);
|
||||
}
|
||||
templateCopyPipelineMap.put(pipStage,stageTaskMap);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
pipStageDao.insertBatch(pipStageList);
|
||||
pipTaskDao.insertBatch(pipTaskList);
|
||||
|
||||
//创建第三个阶段
|
||||
PipStage stageReq3 = new PipStage();
|
||||
stageReq3.setPipelineId(pipeline.getId());
|
||||
stageReq3.setStageName("阶段-3");
|
||||
stageReq3.setCreateTime(LocalDateTime.now());
|
||||
stageReq3.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
stageReq3.setStageSort(3);
|
||||
stageReq3.setParentId("-1");
|
||||
stageReq3.setCode(true);
|
||||
stageService.save(stageReq3);
|
||||
//清空数组
|
||||
pipStageList.clear();
|
||||
pipTaskList.clear();
|
||||
|
||||
PipStage childStage31 = new PipStage();
|
||||
childStage31.setStageName("并行任务-3-1");
|
||||
childStage31.setPipelineId(pipeline.getId());
|
||||
childStage31.setCreateTime(LocalDateTime.now());
|
||||
childStage31.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
childStage31.setStageSort(1);
|
||||
childStage31.setCode(false);
|
||||
childStage31.setParentId(stageReq3.getId());
|
||||
stageService.save(childStage31);
|
||||
templateCopyPipelineMap.forEach((parentStage, childStages) -> {
|
||||
|
||||
PipTask childTask31 = new PipTask();
|
||||
childTask31.setCreateTime(LocalDateTime.now());
|
||||
childTask31.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
childTask31.setTaskName("串行任务-3-1");
|
||||
childTask31.setPipelineId(pipeline.getId());
|
||||
childTask31.setTaskType("AFL");
|
||||
childTask31.setTaskSort(1);
|
||||
childTask31.setStageId(childStage31.getId());
|
||||
taskService.save(childTask31);
|
||||
childStages.forEach((childStage, tasks) -> {
|
||||
childStage.setParentId(parentStage.getId());
|
||||
pipStageList.add(childStage);
|
||||
|
||||
//创建第四个阶段
|
||||
//TODO
|
||||
// PipStage stageReq4 = new PipStage();
|
||||
// stageReq4.setPipelineId(pipeline.getId());
|
||||
// stageReq4.setStageName("阶段-4");
|
||||
// stageReq4.setCreateTime(LocalDateTime.now());
|
||||
// stageReq4.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
// stageReq4.setStageSort(4);
|
||||
// stageReq4.setParentId("-1");
|
||||
// stageReq4.setCode(true);
|
||||
// stageService.save(stageReq4);
|
||||
//
|
||||
// PipStage childStage41 = new PipStage();
|
||||
// childStage41.setStageName("并行任务-4-1");
|
||||
// childStage41.setPipelineId(pipeline.getId());
|
||||
// childStage41.setCreateTime(LocalDateTime.now());
|
||||
// childStage41.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
// childStage41.setStageSort(1);
|
||||
// childStage41.setCode(false);
|
||||
// childStage41.setParentId(stageReq4.getId());
|
||||
// stageService.save(childStage41);
|
||||
//
|
||||
// PipTask childTask41 = new PipTask();
|
||||
// childTask41.setCreateTime(LocalDateTime.now());
|
||||
// childTask41.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
// childTask41.setTaskName("串行任务-4-1");
|
||||
// childTask41.setPipelineId(pipeline.getId());
|
||||
// childTask41.setTaskType("REPORT");
|
||||
// childTask41.setTaskSort(1);
|
||||
// childTask41.setStageId(childStage41.getId());
|
||||
// taskService.save(childTask41);
|
||||
tasks.forEach(task -> {
|
||||
task.setStageId(childStage.getId());
|
||||
pipTaskList.add(task);
|
||||
});
|
||||
});
|
||||
});
|
||||
pipStageDao.updateBatch(pipStageList);
|
||||
pipTaskDao.updateBatch(pipTaskList);
|
||||
}
|
||||
|
||||
//TODO 创建对应的鉴权关系
|
||||
//TODO 创建对应的消息分发
|
||||
|
@ -7,6 +7,8 @@ import cd.casic.ci.process.process.dataObject.template.TemplateManager;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author HopeLi
|
||||
* @version v1.0
|
||||
@ -15,9 +17,7 @@ import jakarta.validation.Valid;
|
||||
* @Description:
|
||||
*/
|
||||
public interface TemplateManagerService extends IService<TemplateManager> {
|
||||
// String createPipeline(@Valid PipelineCreateReq pipelineReq);
|
||||
//
|
||||
// List<PipelineFindResp> findPipelineList(@Valid PipelineQueryReq pipelineQueryReq);
|
||||
// String createTemplate(@Valid TemplateCreateReq req);
|
||||
//
|
||||
// void deletePipeline(@Valid PipelineReq req);
|
||||
//
|
||||
@ -25,9 +25,11 @@ public interface TemplateManagerService extends IService<TemplateManager> {
|
||||
//
|
||||
// void pipelineClone(@Valid PipelineReq req);
|
||||
//
|
||||
// PipelineFindResp findPipelineById(@Valid PipelineQueryReq pipelineQueryReq);
|
||||
//
|
||||
// TreeRunContextResp getPipelineRunState(String pipelineId);
|
||||
|
||||
PageResult<TemplateFindResp> findTemplatePage(@Valid TemplateQueryReq query);
|
||||
|
||||
List<TemplateFindResp> findTemplateList(@Valid TemplateQueryReq query);
|
||||
|
||||
TemplateFindResp findTemplateById(String id);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import cd.casic.ci.process.process.converter.TemplateConverter;
|
||||
import cd.casic.ci.process.process.dal.template.TemplateManagerDao;
|
||||
import cd.casic.ci.process.process.dal.template.TemplateStageDao;
|
||||
import cd.casic.ci.process.process.dal.template.TemplateTaskDao;
|
||||
import cd.casic.ci.process.process.dataObject.base.BaseIdReq;
|
||||
import cd.casic.ci.process.process.dataObject.template.TemplateManager;
|
||||
import cd.casic.ci.process.process.dataObject.template.TemplateStage;
|
||||
import cd.casic.ci.process.process.dataObject.template.TemplateTask;
|
||||
@ -59,7 +60,7 @@ public class TemplateManagerServiceImpl extends ServiceImpl<TemplateManagerDao,
|
||||
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public String createPipeline(PipelineCreateReq pipelineReq) {
|
||||
// public String createTemplate(PipelineCreateReq pipelineReq) {
|
||||
//
|
||||
// PipPipeline pipeline = new PipPipeline();
|
||||
// BeanUtils.copyProperties(pipelineReq, pipeline);
|
||||
@ -399,6 +400,51 @@ public class TemplateManagerServiceImpl extends ServiceImpl<TemplateManagerDao,
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TemplateFindResp> findTemplateList(TemplateQueryReq query) {
|
||||
QueryWrapper<TemplateManager> wrapper = new QueryWrapper<>();
|
||||
if (!ObjectUtils.isEmpty(query.getId())){
|
||||
wrapper.eq("id",query.getId());
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(query.getIdList())){
|
||||
wrapper.in("id",query.getId());
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(query.getTemplateName())){
|
||||
wrapper.like("template_name",query.getTemplateName());
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(query.getTemplateType())){
|
||||
wrapper.eq("template_type",query.getTemplateType());
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(query.getTemplateCode())){
|
||||
wrapper.eq("template_code",query.getTemplateCode());
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(query.getCreator())){
|
||||
wrapper.eq("creator",query.getCreator());
|
||||
}
|
||||
|
||||
Page<TemplateManager> templateManagerPage = templateManagerDao.selectPage(new Page<>(query.getPageNo(), query.getPageSize()), wrapper);
|
||||
|
||||
if (ObjectUtils.isEmpty(templateManagerPage)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
List<TemplateFindResp> respList = TemplateConverter.INSTANCE.toRespList(templateManagerPage.getRecords());
|
||||
|
||||
//对流水线模板进行流水线信息赋值
|
||||
respList.forEach(this::setStageAndTask);
|
||||
respList.forEach(this::setUserName);
|
||||
return respList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateFindResp findTemplateById(String id) {
|
||||
TemplateManager templateManager = templateManagerDao.selectById(id);
|
||||
TemplateFindResp resp = TemplateConverter.INSTANCE.toResp(templateManager);
|
||||
setStageAndTask(resp);
|
||||
setUserName(resp);
|
||||
return resp;
|
||||
}
|
||||
|
||||
private void setUserName(TemplateFindResp templateFindResp) {
|
||||
if (!StringUtils.isEmpty(templateFindResp.getCreator())){
|
||||
AdminUserDO user = adminUserService.getUser(Long.valueOf(templateFindResp.getCreator()));
|
||||
|
@ -3,6 +3,7 @@ package cd.casic.server.controller;
|
||||
import cd.casic.ci.common.pipeline.req.template.TemplateQueryReq;
|
||||
import cd.casic.ci.common.pipeline.resp.template.TemplateFindResp;
|
||||
import cd.casic.ci.common.pipeline.utils.PageResult;
|
||||
import cd.casic.ci.process.process.dataObject.base.BaseIdReq;
|
||||
import cd.casic.ci.process.process.service.template.TemplateManagerService;
|
||||
import cd.casic.framework.commons.pojo.CommonResult;
|
||||
import jakarta.annotation.Resource;
|
||||
@ -13,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName PipelineController
|
||||
* @Author hopeli
|
||||
@ -27,34 +30,15 @@ public class TemplateManagerController {
|
||||
@Resource
|
||||
private TemplateManagerService templateManagerService;
|
||||
|
||||
// @PermitAll
|
||||
// @PostMapping(path="/createPipeline")
|
||||
// public CommonResult<String> createPipeline(@RequestBody @Valid PipelineCreateReq pipelineReq){
|
||||
// @PostMapping(path="/createTemplate")
|
||||
// public CommonResult<String> createTemplate(@RequestBody @Valid TemplateCreateReq req){
|
||||
//
|
||||
// String pipelineId = templateManagerService.createPipeline(pipelineReq);
|
||||
// String templateId = templateManagerService.createTemplate(req);
|
||||
//
|
||||
// return CommonResult.success(pipelineId);
|
||||
// return CommonResult.success(templateId);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @PermitAll
|
||||
// @PostMapping(path="/findPipelineList")
|
||||
// public CommonResult<List<PipelineFindResp>> findPipelineList(@RequestBody @Valid PipelineQueryReq pipelineQueryReq){
|
||||
//
|
||||
// List<PipelineFindResp> respList = templateManagerService.findPipelineList(pipelineQueryReq);
|
||||
//
|
||||
// return CommonResult.success(respList);
|
||||
// }
|
||||
//
|
||||
// @PermitAll
|
||||
// @PostMapping(path="/findPipelineById")
|
||||
// public CommonResult<PipelineFindResp> findPipelineById(@RequestBody @Valid PipelineQueryReq pipelineQueryReq){
|
||||
//
|
||||
// PipelineFindResp resp = templateManagerService.findPipelineById(pipelineQueryReq);
|
||||
//
|
||||
// return CommonResult.success(resp);
|
||||
// }
|
||||
//
|
||||
// @PostMapping(path="/deletePipeline")
|
||||
// public CommonResult<Void> deletePipeline(@RequestBody @Valid PipelineReq req){
|
||||
//
|
||||
@ -80,4 +64,20 @@ public class TemplateManagerController {
|
||||
|
||||
return CommonResult.success(pipelineRespPage);
|
||||
}
|
||||
|
||||
@PostMapping(path="/findTemplateList")
|
||||
public CommonResult<List<TemplateFindResp>> findTemplateList(@RequestBody @Valid TemplateQueryReq query){
|
||||
|
||||
List<TemplateFindResp> respList = templateManagerService.findTemplateList(query);
|
||||
|
||||
return CommonResult.success(respList);
|
||||
}
|
||||
|
||||
@PostMapping(path="/findTemplateById")
|
||||
public CommonResult<TemplateFindResp> findTemplateById(@RequestBody @Valid BaseIdReq req){
|
||||
|
||||
TemplateFindResp resp = templateManagerService.findTemplateById(req.getId());
|
||||
|
||||
return CommonResult.success(resp);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user