From 85c47f165cf5b604ed892457e0901109b7c8f8af Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 16 Feb 2022 18:43:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A1=B9=E7=9B=AE=E5=BA=94=E7=94=A8=E8=A1=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 更改项目应用表字段值 --- .../api/service/ShareInfoService.java | 7 ++- .../base/domain/ProjectApplication.java | 2 +- .../domain/ProjectApplicationExample.java | 56 +++++++++---------- .../base/mapper/ProjectApplicationMapper.java | 2 - .../base/mapper/ProjectApplicationMapper.xml | 22 ++++---- .../constants/ProjectApplicationType.java | 6 ++ .../log/vo/system/SystemReference.java | 2 +- .../metersphere/service/ProjectService.java | 10 ++-- .../db/migration/V108__v1.18_release.sql | 8 +-- .../report/PerformanceReportView.vue | 4 +- .../project/menu/appmanage/AppManage.vue | 20 ++++--- .../project/menu/appmanage/TimingItem.vue | 15 +++-- .../report/detail/TestPlanReportButtons.vue | 4 +- frontend/src/i18n/en-US.js | 1 + frontend/src/i18n/zh-CN.js | 1 + frontend/src/i18n/zh-TW.js | 1 + 16 files changed, 89 insertions(+), 72 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/commons/constants/ProjectApplicationType.java diff --git a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java index 2be912449b..046db61584 100644 --- a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java +++ b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java @@ -8,6 +8,7 @@ import io.metersphere.base.domain.*; import io.metersphere.base.mapper.ShareInfoMapper; import io.metersphere.base.mapper.TestPlanReportMapper; import io.metersphere.base.mapper.ext.ExtShareInfoMapper; +import io.metersphere.commons.constants.ProjectApplicationType; import io.metersphere.commons.constants.ShareType; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.json.JSONSchemaGenerator; @@ -521,10 +522,10 @@ public class ShareInfoService { } String type = ""; if(shareInfo.getShareType().equals("PERFORMANCE_REPORT")){ - type = "PERFORMANCE"; + type = ProjectApplicationType.TRACK_SHARE_REPORT_TIME.toString(); } if(shareInfo.getShareType().equals("PLAN_DB_REPORT")){ - type = "TRACK"; + type = ProjectApplicationType.PERFORMANCE_SHARE_REPORT_TIME.toString(); } if(StringUtils.isBlank(type)){ millisCheck(System.currentTimeMillis() - shareInfo.getUpdateTime() ,1000 * 60 * 60 * 24,shareInfo.getId()); @@ -533,7 +534,7 @@ public class ShareInfoService { if(projectApplication.getProjectId()==null){ millisCheck(System.currentTimeMillis() - shareInfo.getUpdateTime() ,1000 * 60 * 60 * 24,shareInfo.getId()); }else { - String expr= projectApplication.getShareReportExpr(); + String expr= projectApplication.getTypeValue(); long timeMills = getTimeMills(shareInfo.getUpdateTime(),expr); millisCheck(System.currentTimeMillis(),timeMills,shareInfo.getId()); } diff --git a/backend/src/main/java/io/metersphere/base/domain/ProjectApplication.java b/backend/src/main/java/io/metersphere/base/domain/ProjectApplication.java index 155733479e..ba00f35fb2 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ProjectApplication.java +++ b/backend/src/main/java/io/metersphere/base/domain/ProjectApplication.java @@ -9,7 +9,7 @@ public class ProjectApplication implements Serializable { private String type; - private String shareReportExpr; + private String typeValue; private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ProjectApplicationExample.java b/backend/src/main/java/io/metersphere/base/domain/ProjectApplicationExample.java index 4a2dd8e535..fd605e82e0 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ProjectApplicationExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/ProjectApplicationExample.java @@ -244,73 +244,73 @@ public class ProjectApplicationExample { return (Criteria) this; } - public Criteria andShareReportExprIsNull() { - addCriterion("share_report_expr is null"); + public Criteria andTypeValueIsNull() { + addCriterion("type_value is null"); return (Criteria) this; } - public Criteria andShareReportExprIsNotNull() { - addCriterion("share_report_expr is not null"); + public Criteria andTypeValueIsNotNull() { + addCriterion("type_value is not null"); return (Criteria) this; } - public Criteria andShareReportExprEqualTo(String value) { - addCriterion("share_report_expr =", value, "shareReportExpr"); + public Criteria andTypeValueEqualTo(String value) { + addCriterion("type_value =", value, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprNotEqualTo(String value) { - addCriterion("share_report_expr <>", value, "shareReportExpr"); + public Criteria andTypeValueNotEqualTo(String value) { + addCriterion("type_value <>", value, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprGreaterThan(String value) { - addCriterion("share_report_expr >", value, "shareReportExpr"); + public Criteria andTypeValueGreaterThan(String value) { + addCriterion("type_value >", value, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprGreaterThanOrEqualTo(String value) { - addCriterion("share_report_expr >=", value, "shareReportExpr"); + public Criteria andTypeValueGreaterThanOrEqualTo(String value) { + addCriterion("type_value >=", value, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprLessThan(String value) { - addCriterion("share_report_expr <", value, "shareReportExpr"); + public Criteria andTypeValueLessThan(String value) { + addCriterion("type_value <", value, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprLessThanOrEqualTo(String value) { - addCriterion("share_report_expr <=", value, "shareReportExpr"); + public Criteria andTypeValueLessThanOrEqualTo(String value) { + addCriterion("type_value <=", value, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprLike(String value) { - addCriterion("share_report_expr like", value, "shareReportExpr"); + public Criteria andTypeValueLike(String value) { + addCriterion("type_value like", value, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprNotLike(String value) { - addCriterion("share_report_expr not like", value, "shareReportExpr"); + public Criteria andTypeValueNotLike(String value) { + addCriterion("type_value not like", value, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprIn(List values) { - addCriterion("share_report_expr in", values, "shareReportExpr"); + public Criteria andTypeValueIn(List values) { + addCriterion("type_value in", values, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprNotIn(List values) { - addCriterion("share_report_expr not in", values, "shareReportExpr"); + public Criteria andTypeValueNotIn(List values) { + addCriterion("type_value not in", values, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprBetween(String value1, String value2) { - addCriterion("share_report_expr between", value1, value2, "shareReportExpr"); + public Criteria andTypeValueBetween(String value1, String value2) { + addCriterion("type_value between", value1, value2, "typeValue"); return (Criteria) this; } - public Criteria andShareReportExprNotBetween(String value1, String value2) { - addCriterion("share_report_expr not between", value1, value2, "shareReportExpr"); + public Criteria andTypeValueNotBetween(String value1, String value2) { + addCriterion("type_value not between", value1, value2, "typeValue"); return (Criteria) this; } } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ProjectApplicationMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ProjectApplicationMapper.java index 58a568e5d5..30e1d8ceb2 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ProjectApplicationMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ProjectApplicationMapper.java @@ -1,6 +1,5 @@ package io.metersphere.base.mapper; -import io.metersphere.base.domain.Project; import io.metersphere.base.domain.ProjectApplication; import io.metersphere.base.domain.ProjectApplicationExample; import java.util.List; @@ -20,5 +19,4 @@ public interface ProjectApplicationMapper { int updateByExampleSelective(@Param("record") ProjectApplication record, @Param("example") ProjectApplicationExample example); int updateByExample(@Param("record") ProjectApplication record, @Param("example") ProjectApplicationExample example); - } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ProjectApplicationMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ProjectApplicationMapper.xml index 08ede9ac2f..91cbad23bd 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ProjectApplicationMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ProjectApplicationMapper.xml @@ -4,7 +4,7 @@ - + @@ -65,7 +65,7 @@ - project_id, `type`, share_report_expr + project_id, `type`, type_value