From 2d5aadfaaeb60a930162e027e07c5ac99f22b254 Mon Sep 17 00:00:00 2001 From: zhanghailong22 Date: Tue, 22 Dec 2020 09:23:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=A2=AB=E6=B8=85=E7=A9=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../developer/mapper/ProjectMapper.java | 2 + .../developer/service/ProjectService.java | 2 +- src/main/resources/mapper/ProjectMapper.xml | 55 +++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/edgegallery/developer/mapper/ProjectMapper.java b/src/main/java/org/edgegallery/developer/mapper/ProjectMapper.java index 064573b4..57cb757b 100644 --- a/src/main/java/org/edgegallery/developer/mapper/ProjectMapper.java +++ b/src/main/java/org/edgegallery/developer/mapper/ProjectMapper.java @@ -45,6 +45,8 @@ public interface ProjectMapper { int updateTestConfig(ProjectTestConfig testConfig); + int cleanTestConfig(ProjectTestConfig testConfig); + List getTestConfigByProjectId(String projectId); int saveImageConfig(ProjectImageConfig imageConfig); diff --git a/src/main/java/org/edgegallery/developer/service/ProjectService.java b/src/main/java/org/edgegallery/developer/service/ProjectService.java index 64abddd3..c6c96e75 100644 --- a/src/main/java/org/edgegallery/developer/service/ProjectService.java +++ b/src/main/java/org/edgegallery/developer/service/ProjectService.java @@ -963,7 +963,7 @@ public class ProjectService { } LOGGER.info("Update project status to TESTED success"); - int tes = projectMapper.updateTestConfig(testConfig); + int tes = projectMapper.cleanTestConfig(testConfig); if (tes < 1) { LOGGER.error("Update test config {} failed", testConfig.getTestId()); } diff --git a/src/main/resources/mapper/ProjectMapper.xml b/src/main/resources/mapper/ProjectMapper.xml index f90eb07c..0406a5a9 100644 --- a/src/main/resources/mapper/ProjectMapper.xml +++ b/src/main/resources/mapper/ProjectMapper.xml @@ -177,6 +177,61 @@ + UPDATE + tbl_project_test_config + SET + + project_id = #{projectId}, + + + app_api_file_id = #{appApiFileId}, + + + deploy_file_id = #{deployFileId}, + + + private_host = #{privateHost}, + + + platform = #{platform}, + + + hosts = #{hosts, jdbcType=OTHER, typeHandler=org.edgegallery.developer.model.handler.JsonCollectionTypeHandler}, + + + error_log = #{errorLog}, + + + stage_status = #{stageStatus, jdbcType=OTHER, typeHandler=org.edgegallery.developer.model.handler.JsonTypeHandler}, + + + + access_url = #{accessUrl}, + + + deploy_date = #{deployDate}, + + + pods = #{pods}, + + + app_instance_id = #{appInstanceId}, + + + work_load_id = #{workLoadId}, + + + deploy_status = #{deployStatus}, + + + lcm_token = #{lcmToken}, + + test_id = #{testId} + WHERE + test_id = #{testId} + + + UPDATE tbl_project_test_config SET -- Gitee