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