From f0f987776528c1d4b86f790da133edb646b8e32a Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 19 Oct 2020 14:59:24 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=97=B6=E5=9B=A0=E4=B8=BA=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E8=B6=85=E5=87=BA=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6=E8=80=8C?= =?UTF-8?q?=E4=BA=A7=E7=94=9F=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/business/components/project/MsProject.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/business/components/project/MsProject.vue b/frontend/src/business/components/project/MsProject.vue index 911a9e16ad..57c583877a 100644 --- a/frontend/src/business/components/project/MsProject.vue +++ b/frontend/src/business/components/project/MsProject.vue @@ -126,7 +126,7 @@ export default { {min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'} ], description: [ - {max: 500, message: this.$t('commons.input_limit', [0, 500]), trigger: 'blur'} + {max: 250, message: this.$t('commons.input_limit', [0, 250]), trigger: 'blur'} ], }, } From 6cf026addcaeaac426faf10eceeed353bf85b6ff Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 19 Oct 2020 15:11:30 +0800 Subject: [PATCH 2/5] =?UTF-8?q?refactor(=E7=B3=BB=E7=BB=9F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE):=20=E5=8E=BB=E6=8E=89=E5=88=9B=E5=BB=BA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=97=B6=E5=AF=B9=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E7=9A=84=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/components/settings/system/Organization.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index ddf0d4be45..7a7196dd90 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -233,13 +233,7 @@ export default { rule: { name: [ {required: true, message: this.$t('organization.input_name'), trigger: 'blur'}, - {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}, - { - required: true, - pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/, - message: this.$t('organization.special_characters_are_not_supported'), - trigger: 'blur' - } + {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'} ], description: [ {max: 50, message: this.$t('commons.input_limit', [0, 50]), trigger: 'blur'} From 695aae0d9da5aef494e7915323b3e6749d59917f Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 19 Oct 2020 15:20:50 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E5=8E=8B=E5=8A=9B=E9=85=8D=E7=BD=AE-?= =?UTF-8?q?=E5=BC=80=E5=90=AFRPS=E4=B8=8A=E9=99=90=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E6=89=A7=E8=A1=8C=E6=B5=8B=E8=AF=95=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E8=87=AA=E5=8A=A8=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../performance/test/components/PerformancePressureConfig.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index 6837672908..41c7885279 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -201,6 +201,9 @@ export default { case RPS_LIMIT: this.rpsLimit = d.value; break; + case RPS_LIMIT_ENABLE: + this.rpsLimitEnable = d.value; + break; default: break; } From dd86a0f53afb725a732786f17fdcff74b8e88b10 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Mon, 19 Oct 2020 15:44:43 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=A0=BC=E5=BC=8F=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?message=E8=A1=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/base/domain/MessageTask.java | 5 +- .../base/domain/MessageTaskExample.java | 70 +++++++++++++++ .../io/metersphere/base/domain/Notice.java | 3 +- .../base/mapper/MessageTaskMapper.java | 3 +- .../base/mapper/MessageTaskMapper.xml | 85 +++++++++++-------- .../metersphere/base/mapper/NoticeMapper.java | 3 +- .../metersphere/base/mapper/NoticeMapper.xml | 14 +-- .../notice/service/NoticeService.java | 2 + .../db/migration/V33__modify_message_task.sql | 2 + .../src/main/resources/generatorConfig.xml | 1 + .../organization/TaskNotification.vue | 17 +++- .../track/case/components/TestCaseDetail.vue | 20 ++--- 12 files changed, 163 insertions(+), 62 deletions(-) create mode 100644 backend/src/main/resources/db/migration/V33__modify_message_task.sql diff --git a/backend/src/main/java/io/metersphere/base/domain/MessageTask.java b/backend/src/main/java/io/metersphere/base/domain/MessageTask.java index 4b4a851d24..2ac5ed838f 100644 --- a/backend/src/main/java/io/metersphere/base/domain/MessageTask.java +++ b/backend/src/main/java/io/metersphere/base/domain/MessageTask.java @@ -1,8 +1,7 @@ package io.metersphere.base.domain; -import lombok.Data; - import java.io.Serializable; +import lombok.Data; @Data public class MessageTask implements Serializable { @@ -18,5 +17,7 @@ public class MessageTask implements Serializable { private String webhook; + private String identification; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/MessageTaskExample.java b/backend/src/main/java/io/metersphere/base/domain/MessageTaskExample.java index 0fae8ffd12..3d514bda02 100644 --- a/backend/src/main/java/io/metersphere/base/domain/MessageTaskExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/MessageTaskExample.java @@ -523,6 +523,76 @@ public class MessageTaskExample { addCriterion("webhook not between", value1, value2, "webhook"); return (Criteria) this; } + + public Criteria andIdentificationIsNull() { + addCriterion("identification is null"); + return (Criteria) this; + } + + public Criteria andIdentificationIsNotNull() { + addCriterion("identification is not null"); + return (Criteria) this; + } + + public Criteria andIdentificationEqualTo(String value) { + addCriterion("identification =", value, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationNotEqualTo(String value) { + addCriterion("identification <>", value, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationGreaterThan(String value) { + addCriterion("identification >", value, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationGreaterThanOrEqualTo(String value) { + addCriterion("identification >=", value, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationLessThan(String value) { + addCriterion("identification <", value, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationLessThanOrEqualTo(String value) { + addCriterion("identification <=", value, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationLike(String value) { + addCriterion("identification like", value, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationNotLike(String value) { + addCriterion("identification not like", value, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationIn(List values) { + addCriterion("identification in", values, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationNotIn(List values) { + addCriterion("identification not in", values, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationBetween(String value1, String value2) { + addCriterion("identification between", value1, value2, "identification"); + return (Criteria) this; + } + + public Criteria andIdentificationNotBetween(String value1, String value2) { + addCriterion("identification not between", value1, value2, "identification"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/domain/Notice.java b/backend/src/main/java/io/metersphere/base/domain/Notice.java index 8f27a7a9ad..3597afa97a 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Notice.java +++ b/backend/src/main/java/io/metersphere/base/domain/Notice.java @@ -1,8 +1,7 @@ package io.metersphere.base.domain; -import lombok.Data; - import java.io.Serializable; +import lombok.Data; @Data public class Notice implements Serializable { diff --git a/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.java b/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.java index de3d5b7289..a65b6a46f3 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.java @@ -2,9 +2,8 @@ package io.metersphere.base.mapper; import io.metersphere.base.domain.MessageTask; import io.metersphere.base.domain.MessageTaskExample; -import org.apache.ibatis.annotations.Param; - import java.util.List; +import org.apache.ibatis.annotations.Param; public interface MessageTaskMapper { long countByExample(MessageTaskExample example); diff --git a/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.xml index 84e78a37bf..f5dff4f48f 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.xml @@ -8,6 +8,7 @@ + @@ -20,13 +21,13 @@ and ${criterion.condition} - AND ${criterion.condition} #{criterion.value} + and ${criterion.condition} #{criterion.value} - AND ${criterion.condition} #{criterion.value} AND #{criterion.secondValue} + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - AND ${criterion.condition} + and ${criterion.condition} #{listItem} @@ -49,13 +50,13 @@ and ${criterion.condition} - AND ${criterion.condition} #{criterion.value} + and ${criterion.condition} #{criterion.value} - AND ${criterion.condition} #{criterion.value} AND #{criterion.secondValue} + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - AND ${criterion.condition} + and ${criterion.condition} #{listItem} @@ -68,48 +69,48 @@ - id, `type`, event, user_id, task_type, webhook + id, `type`, event, user_id, task_type, webhook, identification - DELETE FROM message_task - WHERE id = #{id,jdbcType=VARCHAR} + delete from message_task + where id = #{id,jdbcType=VARCHAR} - DELETE FROM message_task + delete from message_task - INSERT INTO message_task (id, `type`, event, - user_id, task_type, webhook - ) - VALUES (#{id,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{event,jdbcType=VARCHAR}, - #{userId,jdbcType=VARCHAR}, #{taskType,jdbcType=VARCHAR}, #{webhook,jdbcType=VARCHAR} - ) + insert into message_task (id, `type`, event, + user_id, task_type, webhook, + identification) + values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{event,jdbcType=VARCHAR}, + #{userId,jdbcType=VARCHAR}, #{taskType,jdbcType=VARCHAR}, #{webhook,jdbcType=VARCHAR}, + #{identification,jdbcType=VARCHAR}) - INSERT INTO message_task + insert into message_task id, @@ -129,6 +130,9 @@ webhook, + + identification, + @@ -149,16 +153,19 @@ #{webhook,jdbcType=VARCHAR}, + + #{identification,jdbcType=VARCHAR}, + - UPDATE message_task + update message_task id = #{record.id,jdbcType=VARCHAR}, @@ -178,25 +185,29 @@ webhook = #{record.webhook,jdbcType=VARCHAR}, + + identification = #{record.identification,jdbcType=VARCHAR}, + - UPDATE message_task - SET id = #{record.id,jdbcType=VARCHAR}, + update message_task + set id = #{record.id,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR}, event = #{record.event,jdbcType=VARCHAR}, user_id = #{record.userId,jdbcType=VARCHAR}, task_type = #{record.taskType,jdbcType=VARCHAR}, - webhook = #{record.webhook,jdbcType=VARCHAR} + webhook = #{record.webhook,jdbcType=VARCHAR}, + identification = #{record.identification,jdbcType=VARCHAR} - UPDATE message_task + update message_task `type` = #{type,jdbcType=VARCHAR}, @@ -213,16 +224,20 @@ webhook = #{webhook,jdbcType=VARCHAR}, + + identification = #{identification,jdbcType=VARCHAR}, + - WHERE id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} - UPDATE message_task - SET `type` = #{type,jdbcType=VARCHAR}, + update message_task + set `type` = #{type,jdbcType=VARCHAR}, event = #{event,jdbcType=VARCHAR}, user_id = #{userId,jdbcType=VARCHAR}, task_type = #{taskType,jdbcType=VARCHAR}, - webhook = #{webhook,jdbcType=VARCHAR} - WHERE id = #{id,jdbcType=VARCHAR} + webhook = #{webhook,jdbcType=VARCHAR}, + identification = #{identification,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/NoticeMapper.java b/backend/src/main/java/io/metersphere/base/mapper/NoticeMapper.java index c1cba6f589..c0eeb6e74e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/NoticeMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/NoticeMapper.java @@ -2,9 +2,8 @@ package io.metersphere.base.mapper; import io.metersphere.base.domain.Notice; import io.metersphere.base.domain.NoticeExample; -import org.apache.ibatis.annotations.Param; - import java.util.List; +import org.apache.ibatis.annotations.Param; public interface NoticeMapper { long countByExample(NoticeExample example); diff --git a/backend/src/main/java/io/metersphere/base/mapper/NoticeMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/NoticeMapper.xml index b5d0a07b1a..96feecd148 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/NoticeMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/NoticeMapper.xml @@ -91,8 +91,8 @@ where id = #{id,jdbcType=VARCHAR} - DELETE FROM notice - WHERE id = #{id,jdbcType=VARCHAR} + delete from notice + where id = #{id,jdbcType=VARCHAR} delete from notice @@ -101,10 +101,10 @@ - INSERT INTO notice (id, EVENT, TEST_ID, + insert into notice (id, EVENT, TEST_ID, `ENABLE`, `type`, user_id ) - VALUES (#{id,jdbcType=VARCHAR}, #{event,jdbcType=VARCHAR}, #{testId,jdbcType=VARCHAR}, + values (#{id,jdbcType=VARCHAR}, #{event,jdbcType=VARCHAR}, #{testId,jdbcType=VARCHAR}, #{enable,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR} ) @@ -217,12 +217,12 @@ where id = #{id,jdbcType=VARCHAR} - UPDATE notice - SET EVENT = #{event,jdbcType=VARCHAR}, + update notice + set EVENT = #{event,jdbcType=VARCHAR}, TEST_ID = #{testId,jdbcType=VARCHAR}, `ENABLE` = #{enable,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR}, user_id = #{userId,jdbcType=VARCHAR} - WHERE id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java index dd59718b8e..658001a1db 100644 --- a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java +++ b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java @@ -86,6 +86,7 @@ public class NoticeService { } public void saveMessageTask(MessageRequest messageRequest) { + String identification=UUID.randomUUID().toString(); messageRequest.getMessageDetail().forEach(list -> { list.getEvents().forEach(n -> { list.getUserIds().forEach(m -> { @@ -96,6 +97,7 @@ public class NoticeService { message.setUserId(m); message.setType(list.getType()); message.setWebhook(list.getWebhook()); + message.setIdentification(identification); messageTaskMapper.insert(message); }); }); diff --git a/backend/src/main/resources/db/migration/V33__modify_message_task.sql b/backend/src/main/resources/db/migration/V33__modify_message_task.sql new file mode 100644 index 0000000000..be678663bd --- /dev/null +++ b/backend/src/main/resources/db/migration/V33__modify_message_task.sql @@ -0,0 +1,2 @@ +alter table message_task + add identification varchar(255) not null; \ No newline at end of file diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index df4684a270..404c24f5d6 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -66,6 +66,7 @@
+
diff --git a/frontend/src/business/components/settings/organization/TaskNotification.vue b/frontend/src/business/components/settings/organization/TaskNotification.vue index ef20fba840..fac0df555f 100644 --- a/frontend/src/business/components/settings/organization/TaskNotification.vue +++ b/frontend/src/business/components/settings/organization/TaskNotification.vue @@ -22,11 +22,12 @@ class="tb-edit" border size="mini" - :header-cell-style="{background:'#EDEDED'}" + :header-cell-style="{background:'#ededed'}" >