From cc5fbdac441f234f3670accbaa6f17979a956a73 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 31 May 2023 11:23:09 +0800 Subject: [PATCH] build: load domain --- ...dTestFollow.java => LoadTestFollower.java} | 12 ++-- ...mple.java => LoadTestFollowerExample.java} | 60 +++++++++---------- .../load/mapper/LoadTestFollowMapper.java | 22 ------- .../load/mapper/LoadTestFollowerMapper.java | 22 +++++++ ...wMapper.xml => LoadTestFollowerMapper.xml} | 48 +++++++-------- .../src/main/resources/i18n/load.properties | 8 +-- .../main/resources/i18n/load_en_US.properties | 8 +-- .../main/resources/i18n/load_zh_CN.properties | 8 +-- .../main/resources/i18n/load_zh_TW.properties | 8 +-- 9 files changed, 98 insertions(+), 98 deletions(-) rename backend/framework/domain/src/main/java/io/metersphere/load/domain/{LoadTestFollow.java => LoadTestFollower.java} (56%) rename backend/framework/domain/src/main/java/io/metersphere/load/domain/{LoadTestFollowExample.java => LoadTestFollowerExample.java} (81%) delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowerMapper.java rename backend/framework/domain/src/main/java/io/metersphere/load/mapper/{LoadTestFollowMapper.xml => LoadTestFollowerMapper.xml} (81%) diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollow.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollower.java similarity index 56% rename from backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollow.java rename to backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollower.java index 0b018ebf69..742407a7ed 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollower.java @@ -7,16 +7,16 @@ import java.io.Serializable; import lombok.Data; @Data -public class LoadTestFollow implements Serializable { +public class LoadTestFollower implements Serializable { @Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{load_test_follow.test_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{load_test_follow.test_id.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{load_test_follower.test_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{load_test_follower.test_id.length_range}", groups = {Created.class, Updated.class}) private String testId; @Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{load_test_follow.follow_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{load_test_follow.follow_id.length_range}", groups = {Created.class, Updated.class}) - private String followId; + @NotBlank(message = "{load_test_follower.user_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{load_test_follower.user_id.length_range}", groups = {Created.class, Updated.class}) + private String userId; private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowerExample.java similarity index 81% rename from backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowExample.java rename to backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowerExample.java index 0034341ef7..0113d7b0ee 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowerExample.java @@ -3,14 +3,14 @@ package io.metersphere.load.domain; import java.util.ArrayList; import java.util.List; -public class LoadTestFollowExample { +public class LoadTestFollowerExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public LoadTestFollowExample() { + public LoadTestFollowerExample() { oredCriteria = new ArrayList(); } @@ -174,73 +174,73 @@ public class LoadTestFollowExample { return (Criteria) this; } - public Criteria andFollowIdIsNull() { - addCriterion("follow_id is null"); + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); return (Criteria) this; } - public Criteria andFollowIdIsNotNull() { - addCriterion("follow_id is not null"); + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); return (Criteria) this; } - public Criteria andFollowIdEqualTo(String value) { - addCriterion("follow_id =", value, "followId"); + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotEqualTo(String value) { - addCriterion("follow_id <>", value, "followId"); + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdGreaterThan(String value) { - addCriterion("follow_id >", value, "followId"); + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdGreaterThanOrEqualTo(String value) { - addCriterion("follow_id >=", value, "followId"); + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLessThan(String value) { - addCriterion("follow_id <", value, "followId"); + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLessThanOrEqualTo(String value) { - addCriterion("follow_id <=", value, "followId"); + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLike(String value) { - addCriterion("follow_id like", value, "followId"); + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotLike(String value) { - addCriterion("follow_id not like", value, "followId"); + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdIn(List values) { - addCriterion("follow_id in", values, "followId"); + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotIn(List values) { - addCriterion("follow_id not in", values, "followId"); + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); return (Criteria) this; } - public Criteria andFollowIdBetween(String value1, String value2) { - addCriterion("follow_id between", value1, value2, "followId"); + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotBetween(String value1, String value2) { - addCriterion("follow_id not between", value1, value2, "followId"); + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); return (Criteria) this; } } diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.java deleted file mode 100644 index 75630412d1..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.metersphere.load.mapper; - -import io.metersphere.load.domain.LoadTestFollow; -import io.metersphere.load.domain.LoadTestFollowExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface LoadTestFollowMapper { - long countByExample(LoadTestFollowExample example); - - int deleteByExample(LoadTestFollowExample example); - - int insert(LoadTestFollow record); - - int insertSelective(LoadTestFollow record); - - List selectByExample(LoadTestFollowExample example); - - int updateByExampleSelective(@Param("record") LoadTestFollow record, @Param("example") LoadTestFollowExample example); - - int updateByExample(@Param("record") LoadTestFollow record, @Param("example") LoadTestFollowExample example); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowerMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowerMapper.java new file mode 100644 index 0000000000..90ca22c2a3 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowerMapper.java @@ -0,0 +1,22 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestFollower; +import io.metersphere.load.domain.LoadTestFollowerExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestFollowerMapper { + long countByExample(LoadTestFollowerExample example); + + int deleteByExample(LoadTestFollowerExample example); + + int insert(LoadTestFollower record); + + int insertSelective(LoadTestFollower record); + + List selectByExample(LoadTestFollowerExample example); + + int updateByExampleSelective(@Param("record") LoadTestFollower record, @Param("example") LoadTestFollowerExample example); + + int updateByExample(@Param("record") LoadTestFollower record, @Param("example") LoadTestFollowerExample example); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowerMapper.xml similarity index 81% rename from backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowerMapper.xml index 565be46c5c..bfe92e6621 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowerMapper.xml @@ -1,9 +1,9 @@ - - + + - + @@ -64,15 +64,15 @@ - test_id, follow_id + test_id, user_id - select distinct - from load_test_follow + from load_test_follower @@ -80,49 +80,49 @@ order by ${orderByClause} - - delete from load_test_follow + + delete from load_test_follower - - insert into load_test_follow (test_id, follow_id) - values (#{testId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR}) + + insert into load_test_follower (test_id, user_id) + values (#{testId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}) - - insert into load_test_follow + + insert into load_test_follower test_id, - - follow_id, + + user_id, #{testId,jdbcType=VARCHAR}, - - #{followId,jdbcType=VARCHAR}, + + #{userId,jdbcType=VARCHAR}, - + select count(*) from load_test_follower - update load_test_follow + update load_test_follower test_id = #{record.testId,jdbcType=VARCHAR}, - - follow_id = #{record.followId,jdbcType=VARCHAR}, + + user_id = #{record.userId,jdbcType=VARCHAR}, @@ -130,9 +130,9 @@ - update load_test_follow + update load_test_follower set test_id = #{record.testId,jdbcType=VARCHAR}, - follow_id = #{record.followId,jdbcType=VARCHAR} + user_id = #{record.userId,jdbcType=VARCHAR} diff --git a/backend/framework/sdk/src/main/resources/i18n/load.properties b/backend/framework/sdk/src/main/resources/i18n/load.properties index 8394d83d76..6c7acf957f 100644 --- a/backend/framework/sdk/src/main/resources/i18n/load.properties +++ b/backend/framework/sdk/src/main/resources/i18n/load.properties @@ -20,10 +20,10 @@ load_test_report.version_id.not_blank= load_test_report_result.id.not_blank= load_test_report_result.report_id.length_range= load_test_report_result.report_id.not_blank= -load_test_follow.test_id.length_range= -load_test_follow.test_id.not_blank= -load_test_follow.follow_id.length_range= -load_test_follow.follow_id.not_blank= +load_test_follower.test_id.length_range= +load_test_follower.test_id.not_blank= +load_test_follower.user_id.length_range= +load_test_follower.user_id.not_blank= load_test_report_result_part.report_id.not_blank= load_test_report_result_part.report_key.not_blank= load_test_report_result_part.resource_index.not_blank= diff --git a/backend/framework/sdk/src/main/resources/i18n/load_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/load_en_US.properties index ffb57c4792..88f0a7d2ad 100644 --- a/backend/framework/sdk/src/main/resources/i18n/load_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/load_en_US.properties @@ -20,10 +20,10 @@ load_test_report.version_id.not_blank=Load Test Report Version ID is required load_test_report_result.id.not_blank=Load Test Report Result ID is required load_test_report_result.report_id.length_range=Load Test Report Result Report ID must be between {min} and {max} characters load_test_report_result.report_id.not_blank=Load Test Report Result Report ID is required -load_test_follow.test_id.length_range=Load Test Follow Test ID must be between {min} and {max} characters -load_test_follow.test_id.not_blank=Load Test Follow Test ID is required -load_test_follow.follow_id.length_range=Load Test Follow ID must be between {min} and {max} characters -load_test_follow.follow_id.not_blank=Load Test Follow ID is required +load_test_follower.test_id.length_range=Load Test Follow Test ID must be between {min} and {max} characters +load_test_follower.test_id.not_blank=Load Test Follow Test ID is required +load_test_follower.user_id.length_range=Load Test Follow ID must be between {min} and {max} characters +load_test_follower.user_id.not_blank=Load Test Follow ID is required load_test_report_result_part.report_id.not_blank=Load Test Report Result Part Report ID is required load_test_report_result_part.report_key.not_blank=Load Test Report Result Part Report Key is required load_test_report_result_part.resource_index.not_blank=Load Test Report Result Part Resource Index is required diff --git a/backend/framework/sdk/src/main/resources/i18n/load_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/load_zh_CN.properties index 269b731ceb..5b35b0ddc2 100644 --- a/backend/framework/sdk/src/main/resources/i18n/load_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/load_zh_CN.properties @@ -20,10 +20,10 @@ load_test_report.version_id.not_blank=性能测试报告版本ID不能为空 load_test_report_result.id.not_blank=性能测试报告结果ID不能为空 load_test_report_result.report_id.length_range=性能测试报告结果报告ID长度范围为{min}到{max} load_test_report_result.report_id.not_blank=性能测试报告结果报告ID不能为空 -load_test_follow.test_id.length_range=性能测试ID长度范围为{min}到{max} -load_test_follow.test_id.not_blank=性能测试ID不能为空 -load_test_follow.follow_id.length_range=性能测试关注ID长度范围为{min}到{max} -load_test_follow.follow_id.not_blank=性能测试关注ID不能为空 +load_test_follower.test_id.length_range=性能测试ID长度范围为{min}到{max} +load_test_follower.test_id.not_blank=性能测试ID不能为空 +load_test_follower.user_id.length_range=性能测试关注ID长度范围为{min}到{max} +load_test_follower.user_id.not_blank=性能测试关注ID不能为空 load_test_report_result_part.report_id.not_blank=性能测试报告结果报告ID不能为空 load_test_report_result_part.report_key.not_blank=性能测试报告结果报告KEY不能为空 load_test_report_result_part.resource_index.not_blank=性能测试报告结果资源索引不能为空 diff --git a/backend/framework/sdk/src/main/resources/i18n/load_zh_TW.properties b/backend/framework/sdk/src/main/resources/i18n/load_zh_TW.properties index da15520453..446982e65e 100644 --- a/backend/framework/sdk/src/main/resources/i18n/load_zh_TW.properties +++ b/backend/framework/sdk/src/main/resources/i18n/load_zh_TW.properties @@ -20,10 +20,10 @@ load_test_report.version_id.not_blank=性能測試報告版本ID不能為空 load_test_report_result.id.not_blank=性能測試報告結果ID不能為空 load_test_report_result.report_id.length_range=性能測試報告結果報告ID長度範圍為{min}到{max} load_test_report_result.report_id.not_blank=性能測試報告結果報告ID不能為空 -load_test_follow.test_id.length_range=性能測試ID長度範圍為{min}到{max} -load_test_follow.test_id.not_blank=性能測試ID不能為空 -load_test_follow.follow_id.length_range=性能測試關注ID長度範圍為{min}到{max} -load_test_follow.follow_id.not_blank=性能測試關注ID不能為空 +load_test_follower.test_id.length_range=性能測試ID長度範圍為{min}到{max} +load_test_follower.test_id.not_blank=性能測試ID不能為空 +load_test_follower.user_id.length_range=性能測試關注ID長度範圍為{min}到{max} +load_test_follower.user_id.not_blank=性能測試關注ID不能為空 load_test_report_result_part.report_id.not_blank=性能測試報告結果報告ID不能為空 load_test_report_result_part.report_key.not_blank=性能測試報告結果報告KEY不能為空 load_test_report_result_part.resource_index.not_blank=性能測試報告結果資源索引不能為空