diff --git a/src/main/java/org/edgegallery/developer/mapper/ProjectMapper.java b/src/main/java/org/edgegallery/developer/mapper/ProjectMapper.java index 064573b462f50f78bde1c3bb9b3cefc5b2597c28..57cb757bb6f3a7126df5d343e6bfd91aa57ad3e6 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 64abddd3c2e5341986cdf5ddbcca9c7a349a8b6f..c6c96e752d35dd05d5cd31fc4ba17c206f8d9b3b 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 f90eb07c001823ac51fa69c7badb9f1a3170d25d..0406a5a97f0b97a7bf5591421b599d3d2d744886 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