build: load domain

This commit is contained in:
CaptainB 2023-05-26 16:22:53 +08:00
parent 7109e6ddc8
commit d45f036769
12 changed files with 125 additions and 134 deletions

View File

@ -51,7 +51,7 @@ public class LoadTest implements Serializable {
@Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{load_test.create_user.not_blank}", groups = {Updated.class}) @NotBlank(message = "{load_test.create_user.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 100, message = "{load_test.create_user.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{load_test.create_user.length_range}", groups = {Created.class, Updated.class})
private String createUser; private String createUser;
@Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "自定义排序间隔5000", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -11,9 +11,9 @@ import lombok.Data;
@Data @Data
public class LoadTestBlob implements Serializable { public class LoadTestBlob implements Serializable {
@Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{load_test_blob.test_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{load_test_blob.id.not_blank}", groups = {Created.class, Updated.class})
@Size(min = 1, max = 50, message = "{load_test_blob.test_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{load_test_blob.id.length_range}", groups = {Created.class, Updated.class})
private String testId; private String id;
@Schema(title = "压力配置") @Schema(title = "压力配置")
private byte[] loadConfiguration; private byte[] loadConfiguration;

View File

@ -104,73 +104,73 @@ public class LoadTestBlobExample {
criteria.add(new Criterion(condition, value1, value2)); criteria.add(new Criterion(condition, value1, value2));
} }
public Criteria andTestIdIsNull() { public Criteria andIdIsNull() {
addCriterion("test_id is null"); addCriterion("id is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdIsNotNull() { public Criteria andIdIsNotNull() {
addCriterion("test_id is not null"); addCriterion("id is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdEqualTo(String value) { public Criteria andIdEqualTo(String value) {
addCriterion("test_id =", value, "testId"); addCriterion("id =", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdNotEqualTo(String value) { public Criteria andIdNotEqualTo(String value) {
addCriterion("test_id <>", value, "testId"); addCriterion("id <>", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdGreaterThan(String value) { public Criteria andIdGreaterThan(String value) {
addCriterion("test_id >", value, "testId"); addCriterion("id >", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdGreaterThanOrEqualTo(String value) { public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("test_id >=", value, "testId"); addCriterion("id >=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdLessThan(String value) { public Criteria andIdLessThan(String value) {
addCriterion("test_id <", value, "testId"); addCriterion("id <", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdLessThanOrEqualTo(String value) { public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("test_id <=", value, "testId"); addCriterion("id <=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdLike(String value) { public Criteria andIdLike(String value) {
addCriterion("test_id like", value, "testId"); addCriterion("id like", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdNotLike(String value) { public Criteria andIdNotLike(String value) {
addCriterion("test_id not like", value, "testId"); addCriterion("id not like", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdIn(List<String> values) { public Criteria andIdIn(List<String> values) {
addCriterion("test_id in", values, "testId"); addCriterion("id in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdNotIn(List<String> values) { public Criteria andIdNotIn(List<String> values) {
addCriterion("test_id not in", values, "testId"); addCriterion("id not in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdBetween(String value1, String value2) { public Criteria andIdBetween(String value1, String value2) {
addCriterion("test_id between", value1, value2, "testId"); addCriterion("id between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTestIdNotBetween(String value1, String value2) { public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("test_id not between", value1, value2, "testId"); addCriterion("id not between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
} }

View File

@ -12,12 +12,12 @@ import lombok.Data;
public class LoadTestFile implements Serializable { public class LoadTestFile implements Serializable {
@Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{load_test_file.test_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{load_test_file.test_id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 64, message = "{load_test_file.test_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{load_test_file.test_id.length_range}", groups = {Created.class, Updated.class})
private String testId; private String testId;
@Schema(title = "文件ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "文件ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{load_test_file.file_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{load_test_file.file_id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 64, message = "{load_test_file.file_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{load_test_file.file_id.length_range}", groups = {Created.class, Updated.class})
private String fileId; private String fileId;
@Schema(title = "文件排序", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "文件排序", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -22,7 +22,7 @@ public class LoadTestReport implements Serializable {
@Schema(title = "报告名称", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "报告名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{load_test_report.name.not_blank}", groups = {Updated.class}) @NotBlank(message = "{load_test_report.name.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 64, message = "{load_test_report.name.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 255, message = "{load_test_report.name.length_range}", groups = {Created.class, Updated.class})
private String name; private String name;
@Schema(title = "报告描述") @Schema(title = "报告描述")
@ -41,7 +41,7 @@ public class LoadTestReport implements Serializable {
@Schema(title = "创建人(执行人)ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "创建人(执行人)ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{load_test_report.create_user.not_blank}", groups = {Updated.class}) @NotBlank(message = "{load_test_report.create_user.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 64, message = "{load_test_report.create_user.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{load_test_report.create_user.length_range}", groups = {Created.class, Updated.class})
private String createUser; private String createUser;
@Schema(title = "触发方式", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "触发方式", requiredMode = Schema.RequiredMode.REQUIRED)
@ -65,7 +65,7 @@ public class LoadTestReport implements Serializable {
@Schema(title = "测试名称", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "测试名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{load_test_report.test_name.not_blank}", groups = {Updated.class}) @NotBlank(message = "{load_test_report.test_name.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 64, message = "{load_test_report.test_name.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 255, message = "{load_test_report.test_name.length_range}", groups = {Created.class, Updated.class})
private String testName; private String testName;
@Schema(title = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -11,9 +11,9 @@ import lombok.Data;
@Data @Data
public class LoadTestReportBlob implements Serializable { public class LoadTestReportBlob implements Serializable {
@Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{load_test_report_blob.report_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{load_test_report_blob.id.not_blank}", groups = {Created.class, Updated.class})
@Size(min = 1, max = 50, message = "{load_test_report_blob.report_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{load_test_report_blob.id.length_range}", groups = {Created.class, Updated.class})
private String reportId; private String id;
@Schema(title = "压力配置") @Schema(title = "压力配置")
private byte[] loadConfiguration; private byte[] loadConfiguration;

View File

@ -104,73 +104,73 @@ public class LoadTestReportBlobExample {
criteria.add(new Criterion(condition, value1, value2)); criteria.add(new Criterion(condition, value1, value2));
} }
public Criteria andReportIdIsNull() { public Criteria andIdIsNull() {
addCriterion("report_id is null"); addCriterion("id is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdIsNotNull() { public Criteria andIdIsNotNull() {
addCriterion("report_id is not null"); addCriterion("id is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdEqualTo(String value) { public Criteria andIdEqualTo(String value) {
addCriterion("report_id =", value, "reportId"); addCriterion("id =", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdNotEqualTo(String value) { public Criteria andIdNotEqualTo(String value) {
addCriterion("report_id <>", value, "reportId"); addCriterion("id <>", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdGreaterThan(String value) { public Criteria andIdGreaterThan(String value) {
addCriterion("report_id >", value, "reportId"); addCriterion("id >", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdGreaterThanOrEqualTo(String value) { public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("report_id >=", value, "reportId"); addCriterion("id >=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdLessThan(String value) { public Criteria andIdLessThan(String value) {
addCriterion("report_id <", value, "reportId"); addCriterion("id <", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdLessThanOrEqualTo(String value) { public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("report_id <=", value, "reportId"); addCriterion("id <=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdLike(String value) { public Criteria andIdLike(String value) {
addCriterion("report_id like", value, "reportId"); addCriterion("id like", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdNotLike(String value) { public Criteria andIdNotLike(String value) {
addCriterion("report_id not like", value, "reportId"); addCriterion("id not like", value, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdIn(List<String> values) { public Criteria andIdIn(List<String> values) {
addCriterion("report_id in", values, "reportId"); addCriterion("id in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdNotIn(List<String> values) { public Criteria andIdNotIn(List<String> values) {
addCriterion("report_id not in", values, "reportId"); addCriterion("id not in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdBetween(String value1, String value2) { public Criteria andIdBetween(String value1, String value2) {
addCriterion("report_id between", value1, value2, "reportId"); addCriterion("id between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andReportIdNotBetween(String value1, String value2) { public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("report_id not between", value1, value2, "reportId"); addCriterion("id not between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
} }

View File

@ -10,7 +10,7 @@ public interface LoadTestBlobMapper {
int deleteByExample(LoadTestBlobExample example); int deleteByExample(LoadTestBlobExample example);
int deleteByPrimaryKey(String testId); int deleteByPrimaryKey(String id);
int insert(LoadTestBlob record); int insert(LoadTestBlob record);
@ -20,7 +20,7 @@ public interface LoadTestBlobMapper {
List<LoadTestBlob> selectByExample(LoadTestBlobExample example); List<LoadTestBlob> selectByExample(LoadTestBlobExample example);
LoadTestBlob selectByPrimaryKey(String testId); LoadTestBlob selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") LoadTestBlob record, @Param("example") LoadTestBlobExample example); int updateByExampleSelective(@Param("record") LoadTestBlob record, @Param("example") LoadTestBlobExample example);

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.load.mapper.LoadTestBlobMapper"> <mapper namespace="io.metersphere.load.mapper.LoadTestBlobMapper">
<resultMap id="BaseResultMap" type="io.metersphere.load.domain.LoadTestBlob"> <resultMap id="BaseResultMap" type="io.metersphere.load.domain.LoadTestBlob">
<id column="test_id" jdbcType="VARCHAR" property="testId" /> <id column="id" jdbcType="VARCHAR" property="id" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.load.domain.LoadTestBlob"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.load.domain.LoadTestBlob">
<result column="load_configuration" jdbcType="LONGVARBINARY" property="loadConfiguration" /> <result column="load_configuration" jdbcType="LONGVARBINARY" property="loadConfiguration" />
@ -68,7 +68,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
test_id id
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
load_configuration, advanced_configuration, env_info load_configuration, advanced_configuration, env_info
@ -109,11 +109,11 @@
, ,
<include refid="Blob_Column_List" /> <include refid="Blob_Column_List" />
from load_test_blob from load_test_blob
where test_id = #{testId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from load_test_blob delete from load_test_blob
where test_id = #{testId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</delete> </delete>
<delete id="deleteByExample" parameterType="io.metersphere.load.domain.LoadTestBlobExample"> <delete id="deleteByExample" parameterType="io.metersphere.load.domain.LoadTestBlobExample">
delete from load_test_blob delete from load_test_blob
@ -122,18 +122,16 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="io.metersphere.load.domain.LoadTestBlob"> <insert id="insert" parameterType="io.metersphere.load.domain.LoadTestBlob">
insert into load_test_blob (test_id, load_configuration, insert into load_test_blob (id, load_configuration, advanced_configuration,
advanced_configuration, env_info env_info)
) values (#{id,jdbcType=VARCHAR}, #{loadConfiguration,jdbcType=LONGVARBINARY}, #{advancedConfiguration,jdbcType=LONGVARBINARY},
values (#{testId,jdbcType=VARCHAR}, #{loadConfiguration,jdbcType=LONGVARBINARY}, #{envInfo,jdbcType=LONGVARBINARY})
#{advancedConfiguration,jdbcType=LONGVARBINARY}, #{envInfo,jdbcType=LONGVARBINARY}
)
</insert> </insert>
<insert id="insertSelective" parameterType="io.metersphere.load.domain.LoadTestBlob"> <insert id="insertSelective" parameterType="io.metersphere.load.domain.LoadTestBlob">
insert into load_test_blob insert into load_test_blob
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="testId != null"> <if test="id != null">
test_id, id,
</if> </if>
<if test="loadConfiguration != null"> <if test="loadConfiguration != null">
load_configuration, load_configuration,
@ -146,8 +144,8 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="testId != null"> <if test="id != null">
#{testId,jdbcType=VARCHAR}, #{id,jdbcType=VARCHAR},
</if> </if>
<if test="loadConfiguration != null"> <if test="loadConfiguration != null">
#{loadConfiguration,jdbcType=LONGVARBINARY}, #{loadConfiguration,jdbcType=LONGVARBINARY},
@ -169,8 +167,8 @@
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
update load_test_blob update load_test_blob
<set> <set>
<if test="record.testId != null"> <if test="record.id != null">
test_id = #{record.testId,jdbcType=VARCHAR}, id = #{record.id,jdbcType=VARCHAR},
</if> </if>
<if test="record.loadConfiguration != null"> <if test="record.loadConfiguration != null">
load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY}, load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY},
@ -188,7 +186,7 @@
</update> </update>
<update id="updateByExampleWithBLOBs" parameterType="map"> <update id="updateByExampleWithBLOBs" parameterType="map">
update load_test_blob update load_test_blob
set test_id = #{record.testId,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY}, load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY},
advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARBINARY}, advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARBINARY},
env_info = #{record.envInfo,jdbcType=LONGVARBINARY} env_info = #{record.envInfo,jdbcType=LONGVARBINARY}
@ -198,7 +196,7 @@
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update load_test_blob update load_test_blob
set test_id = #{record.testId,jdbcType=VARCHAR} set id = #{record.id,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -216,13 +214,13 @@
env_info = #{envInfo,jdbcType=LONGVARBINARY}, env_info = #{envInfo,jdbcType=LONGVARBINARY},
</if> </if>
</set> </set>
where test_id = #{testId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.load.domain.LoadTestBlob"> <update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.load.domain.LoadTestBlob">
update load_test_blob update load_test_blob
set load_configuration = #{loadConfiguration,jdbcType=LONGVARBINARY}, set load_configuration = #{loadConfiguration,jdbcType=LONGVARBINARY},
advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARBINARY}, advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARBINARY},
env_info = #{envInfo,jdbcType=LONGVARBINARY} env_info = #{envInfo,jdbcType=LONGVARBINARY}
where test_id = #{testId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
</mapper> </mapper>

View File

@ -10,7 +10,7 @@ public interface LoadTestReportBlobMapper {
int deleteByExample(LoadTestReportBlobExample example); int deleteByExample(LoadTestReportBlobExample example);
int deleteByPrimaryKey(String reportId); int deleteByPrimaryKey(String id);
int insert(LoadTestReportBlob record); int insert(LoadTestReportBlob record);
@ -20,7 +20,7 @@ public interface LoadTestReportBlobMapper {
List<LoadTestReportBlob> selectByExample(LoadTestReportBlobExample example); List<LoadTestReportBlob> selectByExample(LoadTestReportBlobExample example);
LoadTestReportBlob selectByPrimaryKey(String reportId); LoadTestReportBlob selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") LoadTestReportBlob record, @Param("example") LoadTestReportBlobExample example); int updateByExampleSelective(@Param("record") LoadTestReportBlob record, @Param("example") LoadTestReportBlobExample example);

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.load.mapper.LoadTestReportBlobMapper"> <mapper namespace="io.metersphere.load.mapper.LoadTestReportBlobMapper">
<resultMap id="BaseResultMap" type="io.metersphere.load.domain.LoadTestReportBlob"> <resultMap id="BaseResultMap" type="io.metersphere.load.domain.LoadTestReportBlob">
<id column="report_id" jdbcType="VARCHAR" property="reportId" /> <id column="id" jdbcType="VARCHAR" property="id" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.load.domain.LoadTestReportBlob"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.load.domain.LoadTestReportBlob">
<result column="load_configuration" jdbcType="LONGVARBINARY" property="loadConfiguration" /> <result column="load_configuration" jdbcType="LONGVARBINARY" property="loadConfiguration" />
@ -69,7 +69,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
report_id id
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
load_configuration, jmx_content, advanced_configuration, env_info load_configuration, jmx_content, advanced_configuration, env_info
@ -110,11 +110,11 @@
, ,
<include refid="Blob_Column_List" /> <include refid="Blob_Column_List" />
from load_test_report_blob from load_test_report_blob
where report_id = #{reportId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from load_test_report_blob delete from load_test_report_blob
where report_id = #{reportId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</delete> </delete>
<delete id="deleteByExample" parameterType="io.metersphere.load.domain.LoadTestReportBlobExample"> <delete id="deleteByExample" parameterType="io.metersphere.load.domain.LoadTestReportBlobExample">
delete from load_test_report_blob delete from load_test_report_blob
@ -123,18 +123,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="io.metersphere.load.domain.LoadTestReportBlob"> <insert id="insert" parameterType="io.metersphere.load.domain.LoadTestReportBlob">
insert into load_test_report_blob (report_id, load_configuration, insert into load_test_report_blob (id, load_configuration, jmx_content,
jmx_content, advanced_configuration, advanced_configuration, env_info
env_info) )
values (#{reportId,jdbcType=VARCHAR}, #{loadConfiguration,jdbcType=LONGVARBINARY}, values (#{id,jdbcType=VARCHAR}, #{loadConfiguration,jdbcType=LONGVARBINARY}, #{jmxContent,jdbcType=LONGVARBINARY},
#{jmxContent,jdbcType=LONGVARBINARY}, #{advancedConfiguration,jdbcType=LONGVARBINARY}, #{advancedConfiguration,jdbcType=LONGVARBINARY}, #{envInfo,jdbcType=LONGVARBINARY}
#{envInfo,jdbcType=LONGVARBINARY}) )
</insert> </insert>
<insert id="insertSelective" parameterType="io.metersphere.load.domain.LoadTestReportBlob"> <insert id="insertSelective" parameterType="io.metersphere.load.domain.LoadTestReportBlob">
insert into load_test_report_blob insert into load_test_report_blob
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="reportId != null"> <if test="id != null">
report_id, id,
</if> </if>
<if test="loadConfiguration != null"> <if test="loadConfiguration != null">
load_configuration, load_configuration,
@ -150,8 +150,8 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="reportId != null"> <if test="id != null">
#{reportId,jdbcType=VARCHAR}, #{id,jdbcType=VARCHAR},
</if> </if>
<if test="loadConfiguration != null"> <if test="loadConfiguration != null">
#{loadConfiguration,jdbcType=LONGVARBINARY}, #{loadConfiguration,jdbcType=LONGVARBINARY},
@ -176,8 +176,8 @@
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
update load_test_report_blob update load_test_report_blob
<set> <set>
<if test="record.reportId != null"> <if test="record.id != null">
report_id = #{record.reportId,jdbcType=VARCHAR}, id = #{record.id,jdbcType=VARCHAR},
</if> </if>
<if test="record.loadConfiguration != null"> <if test="record.loadConfiguration != null">
load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY}, load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY},
@ -198,7 +198,7 @@
</update> </update>
<update id="updateByExampleWithBLOBs" parameterType="map"> <update id="updateByExampleWithBLOBs" parameterType="map">
update load_test_report_blob update load_test_report_blob
set report_id = #{record.reportId,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY}, load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY},
jmx_content = #{record.jmxContent,jdbcType=LONGVARBINARY}, jmx_content = #{record.jmxContent,jdbcType=LONGVARBINARY},
advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARBINARY}, advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARBINARY},
@ -209,7 +209,7 @@
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update load_test_report_blob update load_test_report_blob
set report_id = #{record.reportId,jdbcType=VARCHAR} set id = #{record.id,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -230,7 +230,7 @@
env_info = #{envInfo,jdbcType=LONGVARBINARY}, env_info = #{envInfo,jdbcType=LONGVARBINARY},
</if> </if>
</set> </set>
where report_id = #{reportId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.load.domain.LoadTestReportBlob"> <update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.load.domain.LoadTestReportBlob">
update load_test_report_blob update load_test_report_blob
@ -238,6 +238,6 @@
jmx_content = #{jmxContent,jdbcType=LONGVARBINARY}, jmx_content = #{jmxContent,jdbcType=LONGVARBINARY},
advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARBINARY}, advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARBINARY},
env_info = #{envInfo,jdbcType=LONGVARBINARY} env_info = #{envInfo,jdbcType=LONGVARBINARY}
where report_id = #{reportId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
</mapper> </mapper>

View File

@ -53,40 +53,33 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.project.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.load.domain" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.project.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.load.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.project.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.load.mapper"
targetProject="src/main/java"> targetProject="src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>
<!--要生成的数据库表 --> <!--要生成的数据库表 -->
<table tableName="custom_field"/> <table tableName="load_test_api"/>
<table tableName="custom_field_template"/> <table tableName="load_test"/>
<table tableName="custom_function"/> <table tableName="load_test_file"/>
<table tableName="fake_error"/> <table tableName="load_test_follow"/>
<table tableName="file_metadata"/> <table tableName="load_test_report"/>
<table tableName="file_module"/> <table tableName="load_test_report_file"/>
<table tableName="project"/> <table tableName="load_test_report_log"/>
<table tableName="project_application"/> <table tableName="load_test_report_result"/>
<table tableName="project_version"/> <table tableName="load_test_report_result_part"/>
<table tableName="file_module_blob"/> <table tableName="load_test_report_result_realtime"/>
<table tableName="custom_function_blob"/> <table tableName="load_test_blob"/>
<table tableName="fake_error_blob"/> <table tableName="load_test_report_blob"/>
<table tableName="file_metadata_blob"/>
<table tableName="project_extend"/>
<table tableName="functional_case_template"/>
<table tableName="functional_case_template_extend"/>
<table tableName="issue_template_extend"/>
<table tableName="issue_template"/>
<table tableName="api_template"/>
<!-- 要忽略的字段--> <!-- 要忽略的字段-->
<!-- <table tableName="test_case"> <!-- <table tableName="test_case">