fix(接口测试): 修复swagger定时同步覆盖模式不生效的缺陷
--bug=1014696 --user=王孝刚 【接口测试】swagger 定时同步导入,覆盖模式没生效 https://www.tapd.cn/55049933/s/1196530
This commit is contained in:
parent
0b5f22b4e4
commit
ae4743850d
|
@ -17,6 +17,8 @@ public class SwaggerUrlProject implements Serializable {
|
|||
|
||||
private String modeId;
|
||||
|
||||
private Boolean coverModule;
|
||||
|
||||
private String config;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -523,6 +523,66 @@ public class SwaggerUrlProjectExample {
|
|||
addCriterion("mode_id not between", value1, value2, "modeId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleIsNull() {
|
||||
addCriterion("cover_module is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleIsNotNull() {
|
||||
addCriterion("cover_module is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleEqualTo(Boolean value) {
|
||||
addCriterion("cover_module =", value, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleNotEqualTo(Boolean value) {
|
||||
addCriterion("cover_module <>", value, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleGreaterThan(Boolean value) {
|
||||
addCriterion("cover_module >", value, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("cover_module >=", value, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleLessThan(Boolean value) {
|
||||
addCriterion("cover_module <", value, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("cover_module <=", value, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleIn(List<Boolean> values) {
|
||||
addCriterion("cover_module in", values, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleNotIn(List<Boolean> values) {
|
||||
addCriterion("cover_module not in", values, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("cover_module between", value1, value2, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCoverModuleNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("cover_module not between", value1, value2, "coverModule");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -1,287 +1,311 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.base.mapper.SwaggerUrlProjectMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="swagger_url" jdbcType="VARCHAR" property="swaggerUrl" />
|
||||
<result column="module_id" jdbcType="VARCHAR" property="moduleId" />
|
||||
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
||||
<result column="mode_id" jdbcType="VARCHAR" property="modeId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId"/>
|
||||
<result column="swagger_url" jdbcType="VARCHAR" property="swaggerUrl"/>
|
||||
<result column="module_id" jdbcType="VARCHAR" property="moduleId"/>
|
||||
<result column="module_path" jdbcType="VARCHAR" property="modulePath"/>
|
||||
<result column="mode_id" jdbcType="VARCHAR" property="modeId"/>
|
||||
<result column="cover_module" jdbcType="BIT" property="coverModule"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, project_id, swagger_url, module_id, module_path, mode_id, cover_module
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.SwaggerUrlProjectExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, project_id, swagger_url, module_id, module_path, mode_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.SwaggerUrlProjectExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from swagger_url_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.SwaggerUrlProjectExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from swagger_url_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from swagger_url_project
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from swagger_url_project
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.SwaggerUrlProjectExample">
|
||||
delete from swagger_url_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
insert into swagger_url_project (id, project_id, swagger_url,
|
||||
module_id, module_path, mode_id,
|
||||
config)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{swaggerUrl,jdbcType=VARCHAR},
|
||||
#{moduleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{modeId,jdbcType=VARCHAR},
|
||||
#{config,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
insert into swagger_url_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="swaggerUrl != null">
|
||||
swagger_url,
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
module_id,
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
module_path,
|
||||
</if>
|
||||
<if test="modeId != null">
|
||||
mode_id,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="swaggerUrl != null">
|
||||
#{swaggerUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
#{moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
#{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modeId != null">
|
||||
#{modeId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.SwaggerUrlProjectExample" resultType="java.lang.Long">
|
||||
select count(*) from swagger_url_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update swagger_url_project
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from swagger_url_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.SwaggerUrlProjectExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from swagger_url_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from swagger_url_project
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete
|
||||
from swagger_url_project
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.SwaggerUrlProjectExample">
|
||||
delete from swagger_url_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
insert into swagger_url_project (id, project_id, swagger_url,
|
||||
module_id, module_path, mode_id,
|
||||
cover_module, config)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{swaggerUrl,jdbcType=VARCHAR},
|
||||
#{moduleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{modeId,jdbcType=VARCHAR},
|
||||
#{coverModule,jdbcType=BIT}, #{config,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
insert into swagger_url_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="swaggerUrl != null">
|
||||
swagger_url,
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
module_id,
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
module_path,
|
||||
</if>
|
||||
<if test="modeId != null">
|
||||
mode_id,
|
||||
</if>
|
||||
<if test="coverModule != null">
|
||||
cover_module,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="swaggerUrl != null">
|
||||
#{swaggerUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
#{moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
#{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modeId != null">
|
||||
#{modeId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="coverModule != null">
|
||||
#{coverModule,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.SwaggerUrlProjectExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from swagger_url_project
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update swagger_url_project
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.swaggerUrl != null">
|
||||
swagger_url = #{record.swaggerUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.moduleId != null">
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.modulePath != null">
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.modeId != null">
|
||||
mode_id = #{record.modeId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.coverModule != null">
|
||||
cover_module = #{record.coverModule,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.config != null">
|
||||
config = #{record.config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update swagger_url_project
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.swaggerUrl != null">
|
||||
swagger_url = #{record.swaggerUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.moduleId != null">
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.modulePath != null">
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.modeId != null">
|
||||
mode_id = #{record.modeId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.config != null">
|
||||
config = #{record.config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update swagger_url_project
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
swagger_url = #{record.swaggerUrl,jdbcType=VARCHAR},
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
mode_id = #{record.modeId,jdbcType=VARCHAR},
|
||||
config = #{record.config,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update swagger_url_project
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
swagger_url = #{record.swaggerUrl,jdbcType=VARCHAR},
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
mode_id = #{record.modeId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
update swagger_url_project
|
||||
<set>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="swaggerUrl != null">
|
||||
swagger_url = #{swaggerUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modeId != null">
|
||||
mode_id = #{modeId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
update swagger_url_project
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
swagger_url = #{swaggerUrl,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
mode_id = #{modeId,jdbcType=VARCHAR},
|
||||
config = #{config,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
update swagger_url_project
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
swagger_url = #{swaggerUrl,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
mode_id = #{modeId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
cover_module = #{record.coverModule,jdbcType=BIT},
|
||||
config = #{record.config,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update swagger_url_project
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
swagger_url = #{record.swaggerUrl,jdbcType=VARCHAR},
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
mode_id = #{record.modeId,jdbcType=VARCHAR},
|
||||
cover_module = #{record.coverModule,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
update swagger_url_project
|
||||
<set>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="swaggerUrl != null">
|
||||
swagger_url = #{swaggerUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modeId != null">
|
||||
mode_id = #{modeId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="coverModule != null">
|
||||
cover_module = #{coverModule,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
update swagger_url_project
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
swagger_url = #{swaggerUrl,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
mode_id = #{modeId,jdbcType=VARCHAR},
|
||||
cover_module = #{coverModule,jdbcType=BIT},
|
||||
config = #{config,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.SwaggerUrlProject">
|
||||
update swagger_url_project
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
swagger_url = #{swaggerUrl,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
mode_id = #{modeId,jdbcType=VARCHAR},
|
||||
cover_module = #{coverModule,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -5,6 +5,7 @@ import io.metersphere.api.dto.scenario.KeyValue;
|
|||
import io.metersphere.base.domain.Schedule;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -35,5 +36,6 @@ public class ScheduleRequest extends Schedule {
|
|||
private List<KeyValue> headers;
|
||||
private List<KeyValue> arguments;
|
||||
private MsAuthManager authManager;
|
||||
private Boolean coverModule = false;
|
||||
|
||||
}
|
||||
|
|
|
@ -16,13 +16,14 @@ import org.quartz.JobDataMap;
|
|||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobKey;
|
||||
import org.quartz.TriggerKey;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SwaggerUrlImportJob extends MsScheduleJob {
|
||||
private ApiDefinitionService apiDefinitionService;
|
||||
|
||||
public SwaggerUrlImportJob() {
|
||||
apiDefinitionService = CommonBeanFactory.getBean(ApiDefinitionService.class);
|
||||
apiDefinitionService = CommonBeanFactory.getBean(ApiDefinitionService.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,6 +38,8 @@ public class SwaggerUrlImportJob extends MsScheduleJob {
|
|||
request.setProjectId(swaggerUrlProject.getProjectId());
|
||||
request.setSwaggerUrl(swaggerUrlProject.getSwaggerUrl());
|
||||
request.setModuleId(swaggerUrlProject.getModuleId());
|
||||
request.setModeId(swaggerUrlProject.getModeId());
|
||||
request.setCoverModule(swaggerUrlProject.getCoverModule());
|
||||
request.setPlatform("Swagger2");
|
||||
request.setUserId(jobDataMap.getString("userId"));
|
||||
request.setType("schedule");
|
||||
|
@ -53,20 +56,20 @@ public class SwaggerUrlImportJob extends MsScheduleJob {
|
|||
return new TriggerKey(resourceId, ScheduleGroup.SWAGGER_IMPORT.name());
|
||||
}
|
||||
|
||||
public void setAuthInfo(String config, ApiTestImportRequest request){
|
||||
public void setAuthInfo(String config, ApiTestImportRequest request) {
|
||||
// 获取鉴权设置
|
||||
if(StringUtils.isNotBlank(config)){
|
||||
if (StringUtils.isNotBlank(config)) {
|
||||
JSONObject configObj = JSON.parseObject(config, Feature.DisableSpecialKeyDetect);
|
||||
List<KeyValue> headers = JSONObject.parseArray(configObj.getString("headers"), KeyValue.class);
|
||||
if(CollectionUtils.isNotEmpty(headers)){
|
||||
if (CollectionUtils.isNotEmpty(headers)) {
|
||||
request.setHeaders(headers);
|
||||
}
|
||||
List<KeyValue> arguments = JSONObject.parseArray(configObj.getString("arguments"), KeyValue.class);
|
||||
if(CollectionUtils.isNotEmpty(arguments)){
|
||||
if (CollectionUtils.isNotEmpty(arguments)) {
|
||||
request.setArguments(arguments);
|
||||
}
|
||||
MsAuthManager msAuthManager = JSONObject.parseObject(configObj.getString("authManager"), MsAuthManager.class);
|
||||
if(msAuthManager != null){
|
||||
if (msAuthManager != null) {
|
||||
request.setAuthManager(msAuthManager);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -774,7 +774,9 @@ export default {
|
|||
}
|
||||
});
|
||||
this.$emit('getTrashCase');
|
||||
this.$refs.scenarioTable.clearSelection();
|
||||
if (this.$refs.scenarioTable) {
|
||||
this.$refs.scenarioTable.clearSelection();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -205,7 +205,7 @@ export default {
|
|||
},
|
||||
formData: {
|
||||
swaggerUrl: '',
|
||||
modeId: this.$t('commons.not_cover'),
|
||||
modeId: 'incrementalMerge',
|
||||
moduleId: '',
|
||||
rule: '',
|
||||
coverModule: false
|
||||
|
|
|
@ -732,7 +732,9 @@ export default {
|
|||
}
|
||||
});
|
||||
}
|
||||
this.$refs.caseTable.clearSelection();
|
||||
if (this.$refs.caseTable) {
|
||||
this.$refs.caseTable.clearSelection();
|
||||
}
|
||||
},
|
||||
setRunning(id) {
|
||||
this.tableData.forEach(item => {
|
||||
|
|
|
@ -657,7 +657,9 @@ export default {
|
|||
item.caseTotal = parseInt(item.caseTotal);
|
||||
});
|
||||
this.$emit('getTrashApi');
|
||||
this.$refs.table.clearSelection();
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.clearSelection();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.needRefreshModule()) {
|
||||
|
|
Loading…
Reference in New Issue