This commit is contained in:
even 2025-05-12 09:36:41 +08:00
commit a48ed89227
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());
}
public static CommonResult ok() {
return new CommonResult();
public static <T>CommonResult<T> success() {
CommonResult<T> result = new CommonResult<>();
result.code = GlobalErrorCodeConstants.SUCCESS.getCode();
result.msg = "";
return result;
}
@JsonIgnore // 避免 jackson 序列化

View File

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

View File

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

View File

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