This commit is contained in:
HopeLi 2025-05-12 09:36:04 +08:00
parent 67afdbf867
commit 3c4e338b23
4 changed files with 12 additions and 9 deletions

View File

@ -82,8 +82,11 @@ public class CommonResult<T> implements Serializable {
return Objects.equals(code, GlobalErrorCodeConstants.SUCCESS.getCode()); return Objects.equals(code, GlobalErrorCodeConstants.SUCCESS.getCode());
} }
public static CommonResult ok() { public static <T>CommonResult<T> success() {
return new CommonResult(); CommonResult<T> result = new CommonResult<>();
result.code = GlobalErrorCodeConstants.SUCCESS.getCode();
result.msg = "";
return result;
} }
@JsonIgnore // 避免 jackson 序列化 @JsonIgnore // 避免 jackson 序列化

View File

@ -41,7 +41,7 @@ public class EnvController {
// envService.deleteEnv(envId); // envService.deleteEnv(envId);
return CommonResult.ok(); return CommonResult.success();
} }
@PostMapping(path="/findEnvList") @PostMapping(path="/findEnvList")
@ -64,7 +64,7 @@ public class EnvController {
// this.envService.updateEnv(env); // this.envService.updateEnv(env);
return CommonResult.ok(); return CommonResult.success();
} }

View File

@ -41,7 +41,7 @@ public class GroupController {
// groupService.deleteGroup(groupId); // groupService.deleteGroup(groupId);
return CommonResult.ok(); return CommonResult.success();
} }
@PostMapping(path="/findGroupList") @PostMapping(path="/findGroupList")
@ -64,7 +64,7 @@ public class GroupController {
// this.groupService.updateGroup(group); // this.groupService.updateGroup(group);
return CommonResult.ok(); return CommonResult.success();
} }

View File

@ -51,7 +51,7 @@ public class PipelineController {
// pipelineService.deletePipeline(pipelineId); // pipelineService.deletePipeline(pipelineId);
return CommonResult.ok(); return CommonResult.success();
} }
@PostMapping(path="/findOnePipeline") @PostMapping(path="/findOnePipeline")
@ -95,7 +95,7 @@ public class PipelineController {
// pipelineService.updatePipeline(pipeline); // pipelineService.updatePipeline(pipeline);
return CommonResult.ok(); return CommonResult.success();
} }
@ -148,7 +148,7 @@ public class PipelineController {
// pipelineService.pipelineClone(pipelineId,pipelineName); // pipelineService.pipelineClone(pipelineId,pipelineName);
return CommonResult.ok(); return CommonResult.success();
} }
@PostMapping(path="/findPipelineCloneName") @PostMapping(path="/findPipelineCloneName")