0514 ljc
This commit is contained in:
parent
185f1753f3
commit
ef72a38345
@ -0,0 +1,143 @@
|
||||
package cd.casic.ci.common.pipeline.req.pipeline;
|
||||
|
||||
import cd.casic.ci.common.pipeline.req.resource.ResourceReq;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName PipelineReq
|
||||
* @Author hopeli
|
||||
* @Date 2025/5/10 10:53
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PipelineCreateReq {
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String userId;
|
||||
|
||||
private String envId;
|
||||
|
||||
private String groupId;
|
||||
|
||||
/**
|
||||
* @pi.name:createTime
|
||||
* @pi.dataType:string
|
||||
* @pi.desc:流水线创建时间
|
||||
* @pi.value:createTime
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* @pi.name:type
|
||||
* @pi.dataType:Integer
|
||||
* @pi.desc:流水线类型 1.多任务 2.多阶段
|
||||
* @pi.value: 1
|
||||
*/
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* @pi.name:state
|
||||
* @pi.dataType:Integer
|
||||
* @pi.desc:运行状态 1.未运行 2.运行中
|
||||
* @pi.value:1
|
||||
*/
|
||||
private int state;
|
||||
|
||||
/**
|
||||
* @pi.name:power
|
||||
* @pi.dataType:Integer
|
||||
* @pi.desc:项目作用域 1.全局 2.项目
|
||||
* @pi.value:1
|
||||
*/
|
||||
private int power;
|
||||
|
||||
/**
|
||||
* @pi.name:color
|
||||
* @pi.dataType:Integer
|
||||
* @pi.desc:颜色 1~5随机生成
|
||||
* @pi.value:2
|
||||
*/
|
||||
private int color;
|
||||
|
||||
/**
|
||||
* @pi.name:template
|
||||
* @pi.dataType:string
|
||||
* @pi.desc:流水线模板
|
||||
* @pi.value:template
|
||||
*/
|
||||
private String templateId;
|
||||
|
||||
private String targetId;
|
||||
|
||||
private String targetType;
|
||||
|
||||
private String pipelineTag;
|
||||
|
||||
private String resourceId;
|
||||
|
||||
private String remake;
|
||||
|
||||
/**
|
||||
* @pi.name:collect
|
||||
* @pi.dataType:Integer
|
||||
* @pi.desc:收藏 0.未收藏 1.收藏
|
||||
* @pi.value:2
|
||||
*/
|
||||
private int collect;
|
||||
|
||||
|
||||
// // 以下为统计信息
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * @pi.model:execUser
|
||||
// * @pi.desc:用户(执行人)
|
||||
// */
|
||||
// private User execUser;
|
||||
//
|
||||
// /**
|
||||
// * @pi.name:number
|
||||
// * @pi.dataType:Integer
|
||||
// * @pi.desc:执行次数
|
||||
// * @pi.value:2
|
||||
// */
|
||||
// private Integer number;
|
||||
//
|
||||
// /**
|
||||
// * @pi.name:instanceId
|
||||
// * @pi.dataType:string
|
||||
// * @pi.desc:实例id
|
||||
// * @pi.value:instanceId
|
||||
// */
|
||||
// private String instanceId;
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * @pi.name:buildStatus
|
||||
// * @pi.dataType:string
|
||||
// * @pi.desc:最近构建状态
|
||||
// * @pi.value:buildStatus
|
||||
// */
|
||||
// private String buildStatus;
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * @pi.name:lastBuildTime
|
||||
// * @pi.dataType:string
|
||||
// * @pi.desc:最近构建时间
|
||||
// * @pi.value:lastBuildTime
|
||||
// */
|
||||
// private String lastBuildTime;
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * @pi.name:isExec
|
||||
// * @pi.dataType:boolean
|
||||
// * @pi.desc:是否可以执行
|
||||
// * @pi.value:true
|
||||
// */
|
||||
// private Boolean isExec;
|
||||
private ResourceReq resourceReq;
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package cd.casic.ci.common.pipeline.req.resource;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ResourceQueryReq {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 虚拟机类型
|
||||
*/
|
||||
private String vmType;
|
||||
|
||||
/**
|
||||
* 虚拟机名称
|
||||
*/
|
||||
private String vmName;
|
||||
|
||||
/**
|
||||
* 到期释放时间
|
||||
*/
|
||||
private String expirationTime;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String sum;
|
||||
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* cpu架构
|
||||
*/
|
||||
private String cpuFramework;
|
||||
|
||||
/**
|
||||
* GPU配置状态
|
||||
*/
|
||||
private String gpuStatus;
|
||||
|
||||
/**
|
||||
* cpu内核数量
|
||||
*/
|
||||
private String cpuCoreSum;
|
||||
|
||||
/**
|
||||
* 内存
|
||||
*/
|
||||
private String internalStorage;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 系统盘类型
|
||||
*/
|
||||
private String systemDiskType;
|
||||
|
||||
/**
|
||||
* 系统盘内存大小
|
||||
*/
|
||||
private String systemDiskInternalStorage;
|
||||
|
||||
/**
|
||||
* 管理员账号
|
||||
*/
|
||||
private String managerAccount;
|
||||
|
||||
/**
|
||||
* 管理员密码
|
||||
*/
|
||||
private String managerPassword;
|
||||
|
||||
/**
|
||||
* 安全组
|
||||
*/
|
||||
private String securityGroup;
|
||||
|
||||
/**
|
||||
* 调度策略
|
||||
*/
|
||||
private String schedulingPolicy;
|
||||
|
||||
/**
|
||||
* 引导方式
|
||||
*/
|
||||
private String bootMethod;
|
||||
|
||||
/**
|
||||
* 备份机
|
||||
*/
|
||||
private String backup;
|
||||
|
||||
/**
|
||||
* 反亲和组
|
||||
*/
|
||||
private String antiAffinityGroup;
|
||||
|
||||
/**
|
||||
* 流水线id
|
||||
*/
|
||||
private String pipelineId;
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package cd.casic.ci.common.pipeline.req.resource;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ResourceReq {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 虚拟机类型
|
||||
*/
|
||||
private String vmType;
|
||||
|
||||
/**
|
||||
* 虚拟机名称
|
||||
*/
|
||||
private String vmName;
|
||||
|
||||
/**
|
||||
* 到期释放时间
|
||||
*/
|
||||
private String expirationTime;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String sum;
|
||||
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* cpu架构
|
||||
*/
|
||||
private String cpuFramework;
|
||||
|
||||
/**
|
||||
* GPU配置状态
|
||||
*/
|
||||
private String gpuStatus;
|
||||
|
||||
/**
|
||||
* cpu内核数量
|
||||
*/
|
||||
private String cpuCoreSum;
|
||||
|
||||
/**
|
||||
* 内存
|
||||
*/
|
||||
private String internalStorage;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 系统盘类型
|
||||
*/
|
||||
private String systemDiskType;
|
||||
|
||||
/**
|
||||
* 系统盘内存大小
|
||||
*/
|
||||
private String systemDiskInternalStorage;
|
||||
|
||||
/**
|
||||
* 管理员账号
|
||||
*/
|
||||
private String managerAccount;
|
||||
|
||||
/**
|
||||
* 管理员密码
|
||||
*/
|
||||
private String managerPassword;
|
||||
|
||||
/**
|
||||
* 安全组
|
||||
*/
|
||||
private String securityGroup;
|
||||
|
||||
/**
|
||||
* 调度策略
|
||||
*/
|
||||
private String schedulingPolicy;
|
||||
|
||||
/**
|
||||
* 引导方式
|
||||
*/
|
||||
private String bootMethod;
|
||||
|
||||
/**
|
||||
* 备份机
|
||||
*/
|
||||
private String backup;
|
||||
|
||||
/**
|
||||
* 反亲和组
|
||||
*/
|
||||
private String antiAffinityGroup;
|
||||
|
||||
/**
|
||||
* 流水线id
|
||||
*/
|
||||
private String pipelineId;
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package cd.casic.ci.common.pipeline.resp.resource;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ResourceResp {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 虚拟机类型
|
||||
*/
|
||||
private String vmType;
|
||||
|
||||
/**
|
||||
* 虚拟机名称
|
||||
*/
|
||||
private String vmName;
|
||||
|
||||
/**
|
||||
* 到期释放时间
|
||||
*/
|
||||
private String expirationTime;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String sum;
|
||||
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* cpu架构
|
||||
*/
|
||||
private String cpuFramework;
|
||||
|
||||
/**
|
||||
* GPU配置状态
|
||||
*/
|
||||
private String gpuStatus;
|
||||
|
||||
/**
|
||||
* cpu内核数量
|
||||
*/
|
||||
private String cpuCoreSum;
|
||||
|
||||
/**
|
||||
* 内存
|
||||
*/
|
||||
private String internalStorage;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 系统盘类型
|
||||
*/
|
||||
private String systemDiskType;
|
||||
|
||||
/**
|
||||
* 系统盘内存大小
|
||||
*/
|
||||
private String systemDiskInternalStorage;
|
||||
|
||||
/**
|
||||
* 管理员账号
|
||||
*/
|
||||
private String managerAccount;
|
||||
|
||||
/**
|
||||
* 管理员密码
|
||||
*/
|
||||
private String managerPassword;
|
||||
|
||||
/**
|
||||
* 安全组
|
||||
*/
|
||||
private String securityGroup;
|
||||
|
||||
/**
|
||||
* 调度策略
|
||||
*/
|
||||
private String schedulingPolicy;
|
||||
|
||||
/**
|
||||
* 引导方式
|
||||
*/
|
||||
private String bootMethod;
|
||||
|
||||
/**
|
||||
* 备份机
|
||||
*/
|
||||
private String backup;
|
||||
|
||||
/**
|
||||
* 反亲和组
|
||||
*/
|
||||
private String antiAffinityGroup;
|
||||
|
||||
/**
|
||||
* 流水线id
|
||||
*/
|
||||
private String pipelineId;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cd.casic.ci.process.process.dal.pipeline;
|
||||
|
||||
import cd.casic.ci.process.process.dataObject.resource.PipResource;
|
||||
import cd.casic.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
/**
|
||||
* @author HopeLi
|
||||
* @version v1.0
|
||||
* @ClassName PipResourceDao
|
||||
* @Date: 2025/5/13 14:39
|
||||
* @Description:
|
||||
*/
|
||||
public interface PipResourceDao extends BaseMapperX<PipResource> {
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package cd.casic.ci.process.process.dataObject.resource;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PipResource {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 虚拟机类型
|
||||
*/
|
||||
private String vmType;
|
||||
|
||||
/**
|
||||
* 虚拟机名称
|
||||
*/
|
||||
private String vmName;
|
||||
|
||||
/**
|
||||
* 到期释放时间
|
||||
*/
|
||||
private String expirationTime;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String sum;
|
||||
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* cpu架构
|
||||
*/
|
||||
private String cpuFramework;
|
||||
|
||||
/**
|
||||
* GPU配置状态
|
||||
*/
|
||||
private String gpuStatus;
|
||||
|
||||
/**
|
||||
* cpu内核数量
|
||||
*/
|
||||
private String cpuCoreSum;
|
||||
|
||||
/**
|
||||
* 内存
|
||||
*/
|
||||
private String internalStorage;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 系统盘类型
|
||||
*/
|
||||
private String systemDiskType;
|
||||
|
||||
/**
|
||||
* 系统盘内存大小
|
||||
*/
|
||||
private String systemDiskInternalStorage;
|
||||
|
||||
/**
|
||||
* 管理员账号
|
||||
*/
|
||||
private String managerAccount;
|
||||
|
||||
/**
|
||||
* 管理员密码
|
||||
*/
|
||||
private String managerPassword;
|
||||
|
||||
/**
|
||||
* 安全组
|
||||
*/
|
||||
private String securityGroup;
|
||||
|
||||
/**
|
||||
* 调度策略
|
||||
*/
|
||||
private String schedulingPolicy;
|
||||
|
||||
/**
|
||||
* 引导方式
|
||||
*/
|
||||
private String bootMethod;
|
||||
|
||||
/**
|
||||
* 备份机
|
||||
*/
|
||||
private String backup;
|
||||
|
||||
/**
|
||||
* 反亲和组
|
||||
*/
|
||||
private String antiAffinityGroup;
|
||||
|
||||
/**
|
||||
* 流水线id
|
||||
*/
|
||||
private String pipelineId;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package cd.casic.ci.process.process.service.pipeline;
|
||||
|
||||
import cd.casic.ci.common.pipeline.req.pipeline.PipelineReq;
|
||||
import cd.casic.ci.common.pipeline.req.pipeline.PipelineCreateReq;
|
||||
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@ -12,5 +12,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* @Description:
|
||||
*/
|
||||
public interface PipelineService extends IService<PipPipeline> {
|
||||
String createPipeline(PipelineReq pipelineReq);
|
||||
String createPipeline(PipelineCreateReq pipelineReq);
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
package cd.casic.ci.process.process.service.pipeline.impl;
|
||||
|
||||
import cd.casic.ci.common.pipeline.req.pipeline.PipelineReq;
|
||||
import cd.casic.ci.common.pipeline.req.pipeline.PipelineCreateReq;
|
||||
import cd.casic.ci.process.process.dal.pipeline.PipelineDao;
|
||||
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
|
||||
import cd.casic.ci.process.process.dataObject.resource.PipResource;
|
||||
import cd.casic.ci.process.process.dataObject.stage.PipStage;
|
||||
import cd.casic.ci.process.process.dataObject.task.PipTask;
|
||||
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.framework.commons.util.object.BeanUtils;
|
||||
@ -15,6 +17,7 @@ import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
@ -35,9 +38,12 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
||||
@Resource
|
||||
private TaskServiceImpl taskService;
|
||||
|
||||
@Resource
|
||||
private ResourceServiceImpl resourceService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String createPipeline(PipelineReq pipelineReq) {
|
||||
public String createPipeline(PipelineCreateReq pipelineReq) {
|
||||
|
||||
PipPipeline pipeline = new PipPipeline();
|
||||
BeanUtils.copyProperties(pipelineReq, pipeline);
|
||||
@ -174,10 +180,16 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
||||
childTask41.setStageId(childStage4.getStageId());
|
||||
taskService.save(childTask41);
|
||||
|
||||
|
||||
|
||||
//TODO 创建对应的鉴权关系
|
||||
//TODO 创建对应的消息分发
|
||||
|
||||
//新增对应的配置类数据
|
||||
if (!ObjectUtils.isEmpty(pipelineReq.getResourceReq())){
|
||||
PipResource resource = new PipResource();
|
||||
BeanUtils.copyProperties(pipelineReq.getResourceReq(),resource);
|
||||
resource.setPipelineId(pipeline.getId());
|
||||
resourceService.save(resource);
|
||||
}
|
||||
return pipeline.getId();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package cd.casic.ci.process.process.service.resource;
|
||||
|
||||
import cd.casic.ci.process.process.dataObject.resource.PipResource;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author HopeLi
|
||||
* @version v1.0
|
||||
* @ClassName ResourceService
|
||||
* @Date: 2025/5/13 10:27
|
||||
* @Description:
|
||||
*/
|
||||
public interface ResourceService extends IService<PipResource> {
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cd.casic.ci.process.process.service.resource.impl;
|
||||
|
||||
import cd.casic.ci.process.process.dal.pipeline.PipResourceDao;
|
||||
import cd.casic.ci.process.process.dataObject.resource.PipResource;
|
||||
import cd.casic.ci.process.process.service.resource.ResourceService;
|
||||
import cd.casic.ci.process.process.service.stage.impl.StageServiceImpl;
|
||||
import cd.casic.ci.process.process.service.task.impl.TaskServiceImpl;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author HopeLi
|
||||
* @version v1.0
|
||||
* @ClassName ResourceServiceImpl
|
||||
* @Date: 2025/5/13 10:31
|
||||
* @Description:
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ResourceServiceImpl extends ServiceImpl<PipResourceDao, PipResource> implements ResourceService {
|
||||
@Resource
|
||||
private StageServiceImpl stageService;
|
||||
|
||||
@Resource
|
||||
private TaskServiceImpl taskService;
|
||||
|
||||
}
|
@ -45,7 +45,7 @@ public class EnvController {
|
||||
}
|
||||
|
||||
@PostMapping(path="/findEnvList")
|
||||
public CommonResult<List<EnvResp>> findOnePipeline(@NotNull EnvQueryReq query){
|
||||
public CommonResult<List<EnvResp>> findEnvList(@NotNull EnvQueryReq query){
|
||||
|
||||
// List<Env> envList = envService.findEnvList(envQuery);
|
||||
List<EnvResp> envRespList = new ArrayList<>(0);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cd.casic.server.controller;
|
||||
|
||||
import cd.casic.ci.common.pipeline.req.pipeline.PipelineCreateReq;
|
||||
import cd.casic.ci.common.pipeline.req.pipeline.PipelineQueryReq;
|
||||
import cd.casic.ci.common.pipeline.req.pipeline.PipelineReq;
|
||||
import cd.casic.ci.common.pipeline.resp.pipeline.PipelineResp;
|
||||
@ -35,7 +36,7 @@ public class PipelineController {
|
||||
|
||||
@PermitAll
|
||||
@PostMapping(path="/createPipeline")
|
||||
public CommonResult<String> createPipeline(@RequestBody @Valid PipelineReq pipelineReq){
|
||||
public CommonResult<String> createPipeline(@RequestBody @Valid PipelineCreateReq pipelineReq){
|
||||
|
||||
String pipelineId = pipelineService.createPipeline(pipelineReq);
|
||||
|
||||
|
@ -0,0 +1,82 @@
|
||||
package cd.casic.server.controller;
|
||||
|
||||
import cd.casic.ci.common.pipeline.req.resource.ResourceQueryReq;
|
||||
import cd.casic.ci.common.pipeline.req.resource.ResourceReq;
|
||||
import cd.casic.ci.common.pipeline.resp.resource.ResourceResp;
|
||||
import cd.casic.framework.commons.pojo.CommonResult;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import jakarta.validation.Valid;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ResourceController
|
||||
* @Author hopeli
|
||||
* @Date 2025/5/10 10:57
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/resource")
|
||||
public class ResourceController {
|
||||
|
||||
@PostMapping(path="/createResource")
|
||||
public CommonResult<String> createResource(@RequestBody @NotNull @Valid ResourceReq resourceReq){
|
||||
|
||||
// String pipelineAuthHostId = envService.createEnv(env);
|
||||
|
||||
String resourceId = "1";
|
||||
return CommonResult.success(resourceId);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(path="/deleteResource")
|
||||
public CommonResult<Void> deleteResource(@NotNull String resourceId){
|
||||
|
||||
// envService.deleteEnv(envId);
|
||||
|
||||
return CommonResult.success();
|
||||
}
|
||||
|
||||
@PostMapping(path="/findResourceList")
|
||||
public CommonResult<List<ResourceResp>> findResourceList(@NotNull ResourceQueryReq query){
|
||||
|
||||
// List<Env> envList = envService.findEnvList(envQuery);
|
||||
List<ResourceResp> resourceRespList = new ArrayList<>(0);
|
||||
ResourceResp resourceResp = new ResourceResp();
|
||||
resourceRespList.add(resourceResp);
|
||||
|
||||
return CommonResult.success(resourceRespList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping(path="/updateResource")
|
||||
public CommonResult<Void> updateResource(@RequestBody @NotNull @Valid ResourceReq resourceReq){
|
||||
|
||||
// this.envService.updateEnv(env);
|
||||
|
||||
return CommonResult.success();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(path="/findResourcePage")
|
||||
public CommonResult<Page<ResourceResp>> findResourcePage(@RequestBody @NotNull @Valid ResourceQueryReq query){
|
||||
|
||||
// Pagination<Env> envPage = envService.findEnvPage(envQuery);
|
||||
Page<ResourceResp> respPage = new Page<>();
|
||||
List<ResourceResp> resourceRespList = new ArrayList<>(0);
|
||||
ResourceResp resourceResp = new ResourceResp();
|
||||
resourceResp.setId("1");
|
||||
resourceRespList.add(resourceResp);
|
||||
respPage.setRecords(resourceRespList);
|
||||
return CommonResult.success(respPage);
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user