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/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; } 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'} ], }, } 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'}" >