From 9ade6b7005054754d6937f6228c1b628e77d5e88 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 24 Jun 2021 09:36:24 +0800 Subject: [PATCH] =?UTF-8?q?SQL=E5=88=9D=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ++-- .../controller/service/DeployService.java | 16 +++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 1c4cbd1..91fd8c1 100644 --- a/pom.xml +++ b/pom.xml @@ -302,11 +302,11 @@ mysql-connector-java 5.1.47 - + net.wicp.tams diff --git a/src/main/java/net/wicp/tams/app/duckula/controller/service/DeployService.java b/src/main/java/net/wicp/tams/app/duckula/controller/service/DeployService.java index 979620e..8b20e26 100644 --- a/src/main/java/net/wicp/tams/app/duckula/controller/service/DeployService.java +++ b/src/main/java/net/wicp/tams/app/duckula/controller/service/DeployService.java @@ -5,8 +5,6 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; -import org.apache.commons.io.FileUtils; -import org.aspectj.util.FileUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -69,9 +67,9 @@ public class DeployService { IDeploy deploy = (IDeploy) SpringAssit.context.getBean(commonDeploy.getDeploy()); try { Result checkExit = deploy.checkExit(commonDeploy.getId(), commandType, taskId); - if(checkExit.isSuc()) {//存在 + if (checkExit.isSuc()) {// 存在 Result delRes = deploy.deleteConfig(commonDeploy.getId(), commandType, taskId); - if(!delRes.isSuc()) {//删除不成功 + if (!delRes.isSuc()) {// 删除不成功 return delRes; } } @@ -126,21 +124,21 @@ public class DeployService { return null; } } - - public String viewConfK8s(CommandType commandType, Long taskId,int retract) { + + public String viewConfK8s(CommandType commandType, Long taskId, int retract) { DeployK8s deploy = (DeployK8s) SpringAssit.context.getBean("k8s"); try { - String viewConf = deploy.viewK8sConf(commandType, taskId,retract); + String viewConf = deploy.viewK8sConf(commandType, taskId, retract); return viewConf; } catch (Throwable e) { log.error("查看日志错误", e); return null; } } + public String viewConfK8s(CommandType commandType, Long taskId) { - return viewConfK8s(commandType,taskId,-1); + return viewConfK8s(commandType, taskId, -1); } - public String viewConfDeploy(CommandType commandType, Long taskId, Long deployId) { CommonDeploy commonDeploy = commonDeployMapper.selectById(deployId); -- GitLab