fix: 自动生成的实体类冲突

This commit is contained in:
chenjianxing 2021-06-22 13:07:06 +08:00 committed by jianxing
parent 1360462f61
commit 32ebfa30a0
5 changed files with 9 additions and 89 deletions

View File

@ -166,7 +166,7 @@ public class Swagger2Parser extends SwaggerAbstractParser {
private void parsePathParameters(Parameter parameter, List<KeyValue> rests) { private void parsePathParameters(Parameter parameter, List<KeyValue> rests) {
PathParameter pathParameter = (PathParameter) parameter; PathParameter pathParameter = (PathParameter) parameter;
rests.add(new KeyValue(pathParameter.getName(), "", getDefaultStringValue(parameter.getDescription()))); rests.add(new KeyValue(pathParameter.getName(), "", getDefaultStringValue(parameter.getDescription()), pathParameter.getRequired()));
} }
private String getDefaultStringValue(String val) { private String getDefaultStringValue(String val) {

View File

@ -49,7 +49,5 @@ public class ApiScenario implements Serializable {
private String createUser; private String createUser;
private Integer version;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -1603,66 +1603,6 @@ public class ApiScenarioExample {
addCriterion("create_user not between", value1, value2, "createUser"); addCriterion("create_user not between", value1, value2, "createUser");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andVersionIsNull() {
addCriterion("version is null");
return (Criteria) this;
}
public Criteria andVersionIsNotNull() {
addCriterion("version is not null");
return (Criteria) this;
}
public Criteria andVersionEqualTo(Integer value) {
addCriterion("version =", value, "version");
return (Criteria) this;
}
public Criteria andVersionNotEqualTo(Integer value) {
addCriterion("version <>", value, "version");
return (Criteria) this;
}
public Criteria andVersionGreaterThan(Integer value) {
addCriterion("version >", value, "version");
return (Criteria) this;
}
public Criteria andVersionGreaterThanOrEqualTo(Integer value) {
addCriterion("version >=", value, "version");
return (Criteria) this;
}
public Criteria andVersionLessThan(Integer value) {
addCriterion("version <", value, "version");
return (Criteria) this;
}
public Criteria andVersionLessThanOrEqualTo(Integer value) {
addCriterion("version <=", value, "version");
return (Criteria) this;
}
public Criteria andVersionIn(List<Integer> values) {
addCriterion("version in", values, "version");
return (Criteria) this;
}
public Criteria andVersionNotIn(List<Integer> values) {
addCriterion("version not in", values, "version");
return (Criteria) this;
}
public Criteria andVersionBetween(Integer value1, Integer value2) {
addCriterion("version between", value1, value2, "version");
return (Criteria) this;
}
public Criteria andVersionNotBetween(Integer value1, Integer value2) {
addCriterion("version not between", value1, value2, "version");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

View File

@ -24,7 +24,6 @@
<result column="original_state" jdbcType="VARCHAR" property="originalState" /> <result column="original_state" jdbcType="VARCHAR" property="originalState" />
<result column="custom_num" jdbcType="VARCHAR" property="customNum" /> <result column="custom_num" jdbcType="VARCHAR" property="customNum" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" /> <result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="version" jdbcType="INTEGER" property="version" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenarioWithBLOBs"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenarioWithBLOBs">
<result column="scenario_definition" jdbcType="LONGVARCHAR" property="scenarioDefinition" /> <result column="scenario_definition" jdbcType="LONGVARCHAR" property="scenarioDefinition" />
@ -92,8 +91,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, project_id, tags, user_id, api_scenario_module_id, module_path, `name`, `level`, id, project_id, tags, user_id, api_scenario_module_id, module_path, `name`, `level`,
`status`, principal, step_total, follow_people, schedule, create_time, update_time, `status`, principal, step_total, follow_people, schedule, create_time, update_time,
pass_rate, last_result, report_id, num, original_state, custom_num, create_user, pass_rate, last_result, report_id, num, original_state, custom_num, create_user
version
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
scenario_definition, description, use_url scenario_definition, description, use_url
@ -154,8 +152,8 @@
schedule, create_time, update_time, schedule, create_time, update_time,
pass_rate, last_result, report_id, pass_rate, last_result, report_id,
num, original_state, custom_num, num, original_state, custom_num,
create_user, version, scenario_definition, create_user, scenario_definition, description,
description, use_url) use_url)
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR},
#{userId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
@ -163,8 +161,8 @@
#{schedule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{schedule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
#{num,jdbcType=INTEGER}, #{originalState,jdbcType=VARCHAR}, #{customNum,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, #{originalState,jdbcType=VARCHAR}, #{customNum,jdbcType=VARCHAR},
#{createUser,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER}, #{scenarioDefinition,jdbcType=LONGVARCHAR}, #{createUser,jdbcType=VARCHAR}, #{scenarioDefinition,jdbcType=LONGVARCHAR}, #{description,jdbcType=LONGVARCHAR},
#{description,jdbcType=LONGVARCHAR}, #{useUrl,jdbcType=LONGVARCHAR}) #{useUrl,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs"> <insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
insert into api_scenario insert into api_scenario
@ -235,9 +233,6 @@
<if test="createUser != null"> <if test="createUser != null">
create_user, create_user,
</if> </if>
<if test="version != null">
version,
</if>
<if test="scenarioDefinition != null"> <if test="scenarioDefinition != null">
scenario_definition, scenario_definition,
</if> </if>
@ -315,9 +310,6 @@
<if test="createUser != null"> <if test="createUser != null">
#{createUser,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
</if> </if>
<if test="version != null">
#{version,jdbcType=INTEGER},
</if>
<if test="scenarioDefinition != null"> <if test="scenarioDefinition != null">
#{scenarioDefinition,jdbcType=LONGVARCHAR}, #{scenarioDefinition,jdbcType=LONGVARCHAR},
</if> </if>
@ -404,9 +396,6 @@
<if test="record.createUser != null"> <if test="record.createUser != null">
create_user = #{record.createUser,jdbcType=VARCHAR}, create_user = #{record.createUser,jdbcType=VARCHAR},
</if> </if>
<if test="record.version != null">
version = #{record.version,jdbcType=INTEGER},
</if>
<if test="record.scenarioDefinition != null"> <if test="record.scenarioDefinition != null">
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR}, scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR},
</if> </if>
@ -445,7 +434,6 @@
original_state = #{record.originalState,jdbcType=VARCHAR}, original_state = #{record.originalState,jdbcType=VARCHAR},
custom_num = #{record.customNum,jdbcType=VARCHAR}, custom_num = #{record.customNum,jdbcType=VARCHAR},
create_user = #{record.createUser,jdbcType=VARCHAR}, create_user = #{record.createUser,jdbcType=VARCHAR},
version = #{record.version,jdbcType=INTEGER},
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR}, scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}, description = #{record.description,jdbcType=LONGVARCHAR},
use_url = #{record.useUrl,jdbcType=LONGVARCHAR} use_url = #{record.useUrl,jdbcType=LONGVARCHAR}
@ -476,8 +464,7 @@
num = #{record.num,jdbcType=INTEGER}, num = #{record.num,jdbcType=INTEGER},
original_state = #{record.originalState,jdbcType=VARCHAR}, original_state = #{record.originalState,jdbcType=VARCHAR},
custom_num = #{record.customNum,jdbcType=VARCHAR}, custom_num = #{record.customNum,jdbcType=VARCHAR},
create_user = #{record.createUser,jdbcType=VARCHAR}, create_user = #{record.createUser,jdbcType=VARCHAR}
version = #{record.version,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -548,9 +535,6 @@
<if test="createUser != null"> <if test="createUser != null">
create_user = #{createUser,jdbcType=VARCHAR}, create_user = #{createUser,jdbcType=VARCHAR},
</if> </if>
<if test="version != null">
version = #{version,jdbcType=INTEGER},
</if>
<if test="scenarioDefinition != null"> <if test="scenarioDefinition != null">
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR}, scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR},
</if> </if>
@ -586,7 +570,6 @@
original_state = #{originalState,jdbcType=VARCHAR}, original_state = #{originalState,jdbcType=VARCHAR},
custom_num = #{customNum,jdbcType=VARCHAR}, custom_num = #{customNum,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=VARCHAR}, create_user = #{createUser,jdbcType=VARCHAR},
version = #{version,jdbcType=INTEGER},
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR}, scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR},
description = #{description,jdbcType=LONGVARCHAR}, description = #{description,jdbcType=LONGVARCHAR},
use_url = #{useUrl,jdbcType=LONGVARCHAR} use_url = #{useUrl,jdbcType=LONGVARCHAR}
@ -614,8 +597,7 @@
num = #{num,jdbcType=INTEGER}, num = #{num,jdbcType=INTEGER},
original_state = #{originalState,jdbcType=VARCHAR}, original_state = #{originalState,jdbcType=VARCHAR},
custom_num = #{customNum,jdbcType=VARCHAR}, custom_num = #{customNum,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=VARCHAR}, create_user = #{createUser,jdbcType=VARCHAR}
version = #{version,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
</mapper> </mapper>

View File

@ -84,7 +84,7 @@
<!-- <table tableName="custom_field"></table>--> <!-- <table tableName="custom_field"></table>-->
<!-- <table tableName="test_case"></table>--> <!-- <table tableName="test_case"></table>-->
<!-- <table tableName="test_case"></table>--> <!-- <table tableName="test_case"></table>-->
<!-- <table tableName="custom_field_template"></table>--> <table tableName="api_scenario"></table>
<!-- 表名和关键字冲突--> <!-- 表名和关键字冲突-->
<!-- <table tableName="group" delimitIdentifiers="true"></table>--> <!-- <table tableName="group" delimitIdentifiers="true"></table>-->