diff --git a/src/main/java/com/educoder/bridge/k8s/controller/ScriptController.java b/src/main/java/com/educoder/bridge/k8s/controller/ScriptController.java index ac1e62a..d04a43c 100644 --- a/src/main/java/com/educoder/bridge/k8s/controller/ScriptController.java +++ b/src/main/java/com/educoder/bridge/k8s/controller/ScriptController.java @@ -1,21 +1,11 @@ package com.educoder.bridge.k8s.controller; import com.alibaba.fastjson.JSONObject; -import com.educoder.bridge.common.constant.ApiResultCodeCsts; -import com.educoder.bridge.common.model.ApiResult; -import com.educoder.bridge.common.model.BridgePage; -import com.educoder.bridge.game.service.K8sService; -import com.educoder.bridge.k8s.model.BridgePod; import com.educoder.bridge.k8s.model.EvaluatingScript; -import com.educoder.bridge.k8s.model.PodQueryParam; -import com.educoder.bridge.k8s.service.BridgePodService; import com.educoder.bridge.k8s.service.EvaScriptService; -import com.github.pagehelper.Page; -import io.fabric8.kubernetes.api.model.Pod; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import org.apache.commons.lang.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -23,7 +13,6 @@ import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; -import java.util.List; /** * 评测脚本相关的接口 @@ -58,7 +47,7 @@ public class ScriptController { evaluatingScript.setScript(script); evaluatingScript.setCreateTime(now); evaluatingScript.setUpdateTime(now); - evaScriptService.savaEvaluationScript(evaluatingScript); + evaScriptService.saveEvaluationScript(evaluatingScript); } else { evaluatingScript.setScript(script); evaluatingScript.setUpdateTime(now); diff --git a/src/main/java/com/educoder/bridge/k8s/service/EvaScriptService.java b/src/main/java/com/educoder/bridge/k8s/service/EvaScriptService.java index 8e8aae7..a1baeed 100644 --- a/src/main/java/com/educoder/bridge/k8s/service/EvaScriptService.java +++ b/src/main/java/com/educoder/bridge/k8s/service/EvaScriptService.java @@ -18,7 +18,7 @@ public class EvaScriptService { @Autowired private EvaScriptMapper evaScriptMapper; - public void savaEvaluationScript(EvaluatingScript evaluatingScript) { + public void saveEvaluationScript(EvaluatingScript evaluatingScript) { evaScriptMapper.insert(evaluatingScript); }