converter添加与BeanUtils替换
This commit is contained in:
parent
c2c5c67c9b
commit
4c3d22db3c
@ -1,5 +1,7 @@
|
|||||||
package cd.casic.ci.process.process.converter;
|
package cd.casic.ci.process.process.converter;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.dal.req.pipeline.PipelineCreateReq;
|
||||||
|
import cd.casic.ci.process.dal.req.pipeline.PipelineUpdateReq;
|
||||||
import cd.casic.ci.process.dal.resp.pipeline.PipelineFindResp;
|
import cd.casic.ci.process.dal.resp.pipeline.PipelineFindResp;
|
||||||
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
|
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
@ -18,6 +20,8 @@ import java.util.List;
|
|||||||
public interface PipelineConverter {
|
public interface PipelineConverter {
|
||||||
PipelineConverter INSTANCE = Mappers.getMapper(PipelineConverter.class);
|
PipelineConverter INSTANCE = Mappers.getMapper(PipelineConverter.class);
|
||||||
PipelineFindResp toResp(PipPipeline pipPipeline);
|
PipelineFindResp toResp(PipPipeline pipPipeline);
|
||||||
|
PipPipeline reqToDO(PipelineCreateReq req);
|
||||||
|
PipPipeline reqToDO(PipelineUpdateReq req);
|
||||||
List<PipelineFindResp> toRespList(List<PipPipeline> pipPipelines);
|
List<PipelineFindResp> toRespList(List<PipPipeline> pipPipelines);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package cd.casic.ci.process.process.converter;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.dal.resp.stage.StageResp;
|
||||||
|
import cd.casic.ci.process.process.dataObject.stage.PipStage;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface StageConverter {
|
||||||
|
StageConverter INSTANCE = Mappers.getMapper(StageConverter.class);
|
||||||
|
public StageResp converter(PipStage stage);
|
||||||
|
public List<StageResp> converter(List<PipStage> stage);
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
package cd.casic.ci.process.process.converter;
|
package cd.casic.ci.process.process.converter;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.dal.req.target.TargetManagerCreateReq;
|
||||||
|
import cd.casic.ci.process.dal.req.target.TargetManagerUpdateReq;
|
||||||
import cd.casic.ci.process.dal.resp.pipeline.PipelineFindResp;
|
import cd.casic.ci.process.dal.resp.pipeline.PipelineFindResp;
|
||||||
import cd.casic.ci.process.dal.resp.target.TargetManagerResp;
|
import cd.casic.ci.process.dal.resp.target.TargetManagerResp;
|
||||||
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
|
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
|
||||||
@ -22,5 +24,7 @@ public interface TargetConverter {
|
|||||||
|
|
||||||
PipelineFindResp toResp(PipPipeline pipPipeline);
|
PipelineFindResp toResp(PipPipeline pipPipeline);
|
||||||
List<TargetManagerResp> toRespList(List<TargetManager> pipPipelines);
|
List<TargetManagerResp> toRespList(List<TargetManager> pipPipelines);
|
||||||
|
TargetManager reqToDo(TargetManagerCreateReq req);
|
||||||
|
TargetManager reqToDo(TargetManagerUpdateReq req);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
package cd.casic.ci.process.process.converter;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.dal.resp.task.TasksResp;
|
||||||
|
import cd.casic.ci.process.process.dataObject.task.PipTask;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface TaskConverter {
|
||||||
|
TaskConverter INSTANCE = Mappers.getMapper(TaskConverter.class);
|
||||||
|
TasksResp doToResp(PipTask task);
|
||||||
|
}
|
@ -1,7 +1,12 @@
|
|||||||
package cd.casic.ci.process.process.converter;
|
package cd.casic.ci.process.process.converter;
|
||||||
|
|
||||||
import cd.casic.ci.process.dal.resp.template.TemplateFindResp;
|
import cd.casic.ci.process.dal.resp.template.TemplateFindResp;
|
||||||
|
import cd.casic.ci.process.dal.resp.template.TemplateStageResp;
|
||||||
|
import cd.casic.ci.process.dal.resp.template.TemplateTasksResp;
|
||||||
|
import cd.casic.ci.process.process.dataObject.stage.PipStage;
|
||||||
|
import cd.casic.ci.process.process.dataObject.task.PipTask;
|
||||||
import cd.casic.ci.process.process.dataObject.template.TemplateManager;
|
import cd.casic.ci.process.process.dataObject.template.TemplateManager;
|
||||||
|
import cd.casic.ci.process.process.dataObject.template.TemplateStage;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
@ -19,5 +24,8 @@ public interface TemplateConverter {
|
|||||||
TemplateConverter INSTANCE = Mappers.getMapper(TemplateConverter.class);
|
TemplateConverter INSTANCE = Mappers.getMapper(TemplateConverter.class);
|
||||||
TemplateFindResp toResp(TemplateManager templateManager);
|
TemplateFindResp toResp(TemplateManager templateManager);
|
||||||
List<TemplateFindResp> toRespList(List<TemplateManager> templateManagers);
|
List<TemplateFindResp> toRespList(List<TemplateManager> templateManagers);
|
||||||
|
PipStage respToStage(TemplateStageResp resp);
|
||||||
|
TemplateStageResp stageTemplateToResp(TemplateStage stage);
|
||||||
|
PipTask templateTaskToTask(TemplateTasksResp resp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import cd.casic.ci.process.engine.manager.RunContextManager;
|
|||||||
import cd.casic.ci.process.engine.runContext.BaseRunContext;
|
import cd.casic.ci.process.engine.runContext.BaseRunContext;
|
||||||
import cd.casic.ci.process.engine.runContext.PipelineRunContext;
|
import cd.casic.ci.process.engine.runContext.PipelineRunContext;
|
||||||
import cd.casic.ci.process.process.converter.PipelineConverter;
|
import cd.casic.ci.process.process.converter.PipelineConverter;
|
||||||
|
import cd.casic.ci.process.process.converter.TemplateConverter;
|
||||||
import cd.casic.ci.process.process.dal.pipeline.PipStageDao;
|
import cd.casic.ci.process.process.dal.pipeline.PipStageDao;
|
||||||
import cd.casic.ci.process.process.dal.pipeline.PipTaskDao;
|
import cd.casic.ci.process.process.dal.pipeline.PipTaskDao;
|
||||||
import cd.casic.ci.process.process.dal.pipeline.PipelineDao;
|
import cd.casic.ci.process.process.dal.pipeline.PipelineDao;
|
||||||
@ -82,6 +83,10 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private TemplateManagerServiceImpl templateService;
|
private TemplateManagerServiceImpl templateService;
|
||||||
|
@Resource
|
||||||
|
private PipelineConverter pipelineConverter;
|
||||||
|
@Resource
|
||||||
|
private TemplateConverter templateConverter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@ -90,9 +95,8 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
List<PipTask> pipTaskList = new ArrayList<>(0);
|
List<PipTask> pipTaskList = new ArrayList<>(0);
|
||||||
|
|
||||||
Map<PipStage,Map<PipStage,List<PipTask>>> templateCopyPipelineMap = new HashMap<>();
|
Map<PipStage,Map<PipStage,List<PipTask>>> templateCopyPipelineMap = new HashMap<>();
|
||||||
|
PipPipeline pipeline = pipelineConverter.reqToDO(pipelineReq);
|
||||||
|
|
||||||
PipPipeline pipeline = new PipPipeline();
|
|
||||||
BeanUtils.copyProperties(pipelineReq, pipeline);
|
|
||||||
// 随机颜色
|
// 随机颜色
|
||||||
int randomNumber = (int)(Math.random() * 5) + 1;
|
int randomNumber = (int)(Math.random() * 5) + 1;
|
||||||
pipeline.setColor(randomNumber);
|
pipeline.setColor(randomNumber);
|
||||||
@ -111,9 +115,7 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
//新增阶段数据
|
//新增阶段数据
|
||||||
List<TemplateStageResp> stageList = template.getStageList();
|
List<TemplateStageResp> stageList = template.getStageList();
|
||||||
stageList.forEach(o->{
|
stageList.forEach(o->{
|
||||||
PipStage pipStage = new PipStage();
|
PipStage pipStage = templateConverter.respToStage(o);
|
||||||
BeanUtils.copyProperties(o,pipStage);
|
|
||||||
|
|
||||||
pipStage.setId(null);
|
pipStage.setId(null);
|
||||||
pipStage.setPipelineId(pipeline.getId());
|
pipStage.setPipelineId(pipeline.getId());
|
||||||
pipStage.setCreateTime(LocalDateTime.now());
|
pipStage.setCreateTime(LocalDateTime.now());
|
||||||
@ -129,8 +131,7 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
if (!CollectionUtils.isEmpty(childStageList)){
|
if (!CollectionUtils.isEmpty(childStageList)){
|
||||||
//则代表大阶段下存在阶段子节点
|
//则代表大阶段下存在阶段子节点
|
||||||
childStageList.forEach(j->{
|
childStageList.forEach(j->{
|
||||||
PipStage childStage = new PipStage();
|
PipStage childStage = templateConverter.respToStage(j);
|
||||||
BeanUtils.copyProperties(j,childStage);
|
|
||||||
Map<PipStage,List<PipTask>> stageTaskMap = new HashMap<>();
|
Map<PipStage,List<PipTask>> stageTaskMap = new HashMap<>();
|
||||||
|
|
||||||
childStage.setId(null);
|
childStage.setId(null);
|
||||||
@ -148,8 +149,7 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
if (!CollectionUtils.isEmpty(j.getTaskValues())){
|
if (!CollectionUtils.isEmpty(j.getTaskValues())){
|
||||||
List<PipTask> taskList = new ArrayList<>(0);
|
List<PipTask> taskList = new ArrayList<>(0);
|
||||||
j.getTaskValues().forEach(k->{
|
j.getTaskValues().forEach(k->{
|
||||||
PipTask pipTask = new PipTask();
|
PipTask pipTask = templateConverter.templateTaskToTask(k);
|
||||||
BeanUtils.copyProperties(k,pipTask);
|
|
||||||
pipTask.setId(null);
|
pipTask.setId(null);
|
||||||
pipTask.setPipelineId(pipeline.getId());
|
pipTask.setPipelineId(pipeline.getId());
|
||||||
pipTask.setCreateTime(LocalDateTime.now());
|
pipTask.setCreateTime(LocalDateTime.now());
|
||||||
@ -280,8 +280,7 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updatePipeline(PipelineUpdateReq pipeline) {
|
public void updatePipeline(PipelineUpdateReq pipeline) {
|
||||||
PipPipeline pipPipeline = new PipPipeline();
|
PipPipeline pipPipeline = pipelineConverter.reqToDO(pipeline);
|
||||||
BeanUtils.copyProperties(pipeline,pipPipeline);
|
|
||||||
pipPipeline.setUpdateTime(LocalDateTime.now());
|
pipPipeline.setUpdateTime(LocalDateTime.now());
|
||||||
pipPipeline.setUpdater(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
pipPipeline.setUpdater(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||||
pipelineDao.updateById(pipPipeline);
|
pipelineDao.updateById(pipPipeline);
|
||||||
|
@ -8,6 +8,7 @@ import cd.casic.ci.process.dal.resp.context.SingletonRunContextResp;
|
|||||||
import cd.casic.ci.process.dal.resp.stage.StageResp;
|
import cd.casic.ci.process.dal.resp.stage.StageResp;
|
||||||
import cd.casic.ci.process.engine.manager.RunContextManager;
|
import cd.casic.ci.process.engine.manager.RunContextManager;
|
||||||
import cd.casic.ci.process.engine.runContext.BaseRunContext;
|
import cd.casic.ci.process.engine.runContext.BaseRunContext;
|
||||||
|
import cd.casic.ci.process.process.converter.StageConverter;
|
||||||
import cd.casic.ci.process.process.dal.pipeline.PipStageDao;
|
import cd.casic.ci.process.process.dal.pipeline.PipStageDao;
|
||||||
import cd.casic.ci.process.process.dataObject.stage.PipStage;
|
import cd.casic.ci.process.process.dataObject.stage.PipStage;
|
||||||
import cd.casic.ci.process.process.dataObject.task.PipTask;
|
import cd.casic.ci.process.process.dataObject.task.PipTask;
|
||||||
@ -15,7 +16,6 @@ import cd.casic.ci.process.process.service.stage.StageService;
|
|||||||
import cd.casic.ci.process.process.service.task.TaskService;
|
import cd.casic.ci.process.process.service.task.TaskService;
|
||||||
import cd.casic.framework.commons.exception.ServiceException;
|
import cd.casic.framework.commons.exception.ServiceException;
|
||||||
import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants;
|
import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants;
|
||||||
import cd.casic.framework.commons.util.object.BeanUtils;
|
|
||||||
import cd.casic.framework.commons.util.util.WebFrameworkUtils;
|
import cd.casic.framework.commons.util.util.WebFrameworkUtils;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@ -38,6 +38,8 @@ public class StageServiceImpl extends ServiceImpl<PipStageDao, PipStage> impleme
|
|||||||
private PipStageDao stageDao;
|
private PipStageDao stageDao;
|
||||||
@Resource
|
@Resource
|
||||||
private RunContextManager contextManager;
|
private RunContextManager contextManager;
|
||||||
|
@Resource
|
||||||
|
private StageConverter stageConverter;
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public String createStagesOrTask(StageCreateReq stageReq) {
|
public String createStagesOrTask(StageCreateReq stageReq) {
|
||||||
@ -159,13 +161,9 @@ public class StageServiceImpl extends ServiceImpl<PipStageDao, PipStage> impleme
|
|||||||
for (PipStage stage : stageMainStage) {
|
for (PipStage stage : stageMainStage) {
|
||||||
String stagesId = stage.getId();
|
String stagesId = stage.getId();
|
||||||
//获取从节点
|
//获取从节点
|
||||||
List<PipStage> allStageStage = findSecondStageAndTask(stagesId);
|
List<PipStage> allSecondStage = findSecondStageAndTask(stagesId);
|
||||||
List<StageResp> stageRespList = allStageStage.stream().map(it -> {
|
List<StageResp> stageRespList = stageConverter.converter(allSecondStage);
|
||||||
// BeanUtils.copyProperties(it, stageResp);
|
StageResp stageResp = stageConverter.converter(stage);
|
||||||
return JSON.parseObject(JSON.toJSONString(it), StageResp.class);
|
|
||||||
}).toList();
|
|
||||||
StageResp stageResp = new StageResp();
|
|
||||||
BeanUtils.copyProperties(stage,stageResp);
|
|
||||||
stageResp.setStageList(stageRespList);
|
stageResp.setStageList(stageRespList);
|
||||||
list.add(stageResp);
|
list.add(stageResp);
|
||||||
}
|
}
|
||||||
|
@ -58,12 +58,13 @@ public class TargetManagerServiceImpl extends ServiceImpl<TargetManagerDao, Targ
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private TargetVersionDao targetVersionDao;
|
private TargetVersionDao targetVersionDao;
|
||||||
|
@Resource
|
||||||
|
private TargetConverter targetConverter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void createTarget(TargetManagerCreateReq req) {
|
public void createTarget(TargetManagerCreateReq req) {
|
||||||
TargetManager targetManager = new TargetManager();
|
TargetManager targetManager = targetConverter.reqToDo(req);
|
||||||
BeanUtils.copyProperties(req, targetManager);
|
|
||||||
targetManager.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
targetManager.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||||
targetManager.setCreateTime(LocalDateTime.now());
|
targetManager.setCreateTime(LocalDateTime.now());
|
||||||
this.save(targetManager);
|
this.save(targetManager);
|
||||||
@ -91,7 +92,7 @@ public class TargetManagerServiceImpl extends ServiceImpl<TargetManagerDao, Targ
|
|||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"数据错误,请联系管理员");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"数据错误,请联系管理员");
|
||||||
}
|
}
|
||||||
|
|
||||||
BeanUtils.copyProperties(req,targetManager);
|
targetManager=targetConverter.reqToDo(req);
|
||||||
targetManager.setUpdater(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
targetManager.setUpdater(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||||
targetManager.setUpdateTime(LocalDateTime.now());
|
targetManager.setUpdateTime(LocalDateTime.now());
|
||||||
targetManagerDao.updateById(targetManager);
|
targetManagerDao.updateById(targetManager);
|
||||||
|
@ -4,6 +4,7 @@ import cd.casic.ci.process.dal.req.task.TaskUpdateReq;
|
|||||||
import cd.casic.ci.process.dal.resp.task.TasksResp;
|
import cd.casic.ci.process.dal.resp.task.TasksResp;
|
||||||
import cd.casic.ci.process.engine.manager.LoggerManager;
|
import cd.casic.ci.process.engine.manager.LoggerManager;
|
||||||
import cd.casic.ci.process.engine.manager.RunContextManager;
|
import cd.casic.ci.process.engine.manager.RunContextManager;
|
||||||
|
import cd.casic.ci.process.process.converter.TaskConverter;
|
||||||
import cd.casic.ci.process.process.dal.pipeline.PipTaskDao;
|
import cd.casic.ci.process.process.dal.pipeline.PipTaskDao;
|
||||||
import cd.casic.ci.process.process.dataObject.task.PipTask;
|
import cd.casic.ci.process.process.dataObject.task.PipTask;
|
||||||
import cd.casic.ci.process.process.service.task.TaskService;
|
import cd.casic.ci.process.process.service.task.TaskService;
|
||||||
@ -34,6 +35,8 @@ public class TaskServiceImpl extends ServiceImpl<PipTaskDao, PipTask> implements
|
|||||||
private RunContextManager contextManager;
|
private RunContextManager contextManager;
|
||||||
@Resource
|
@Resource
|
||||||
private LoggerManager loggerManager;
|
private LoggerManager loggerManager;
|
||||||
|
@Resource
|
||||||
|
private TaskConverter taskConverter;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -63,9 +66,7 @@ public class TaskServiceImpl extends ServiceImpl<PipTaskDao, PipTask> implements
|
|||||||
if (CollectionUtils.isEmpty(taskList)) {
|
if (CollectionUtils.isEmpty(taskList)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
TasksResp tasksResp = new TasksResp();
|
return taskConverter.doToResp(taskList.get(0));
|
||||||
BeanUtils.copyProperties(taskList.get(0),tasksResp);
|
|
||||||
return tasksResp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -4,6 +4,7 @@ package cd.casic.ci.process.process.service.template.impl;
|
|||||||
import cd.casic.ci.process.dal.req.template.TemplateQueryReq;
|
import cd.casic.ci.process.dal.req.template.TemplateQueryReq;
|
||||||
import cd.casic.ci.process.dal.resp.template.TemplateFindResp;
|
import cd.casic.ci.process.dal.resp.template.TemplateFindResp;
|
||||||
import cd.casic.ci.process.dal.resp.template.TemplateStageResp;
|
import cd.casic.ci.process.dal.resp.template.TemplateStageResp;
|
||||||
|
import cd.casic.ci.process.process.converter.StageConverter;
|
||||||
import cd.casic.ci.process.process.converter.TemplateConverter;
|
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.TemplateManagerDao;
|
||||||
import cd.casic.ci.process.process.dal.template.TemplateStageDao;
|
import cd.casic.ci.process.process.dal.template.TemplateStageDao;
|
||||||
@ -57,6 +58,8 @@ public class TemplateManagerServiceImpl extends ServiceImpl<TemplateManagerDao,
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private AdminUserServiceImpl adminUserService;
|
private AdminUserServiceImpl adminUserService;
|
||||||
|
@Resource
|
||||||
|
private TemplateConverter templateConverter;
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
// @Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
@ -478,8 +481,7 @@ public class TemplateManagerServiceImpl extends ServiceImpl<TemplateManagerDao,
|
|||||||
// BeanUtils.copyProperties(it, stageResp);
|
// BeanUtils.copyProperties(it, stageResp);
|
||||||
return JSON.parseObject(JSON.toJSONString(it), TemplateStageResp.class);
|
return JSON.parseObject(JSON.toJSONString(it), TemplateStageResp.class);
|
||||||
}).toList();
|
}).toList();
|
||||||
TemplateStageResp stageResp = new TemplateStageResp();
|
TemplateStageResp stageResp = templateConverter.stageTemplateToResp(stage);
|
||||||
BeanUtils.copyProperties(stage,stageResp);
|
|
||||||
stageResp.setStageList(stageRespList);
|
stageResp.setStageList(stageRespList);
|
||||||
list.add(stageResp);
|
list.add(stageResp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user