mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-30 02:58:31 +08:00
feat(测试计划): 补充接口文档分享domain
--story=1016179 --user=宋昌昌 【接口测试】接口文档 https://www.tapd.cn/55049933/s/1589978
This commit is contained in:
parent
bb098c9b2f
commit
b9a052fd35
@ -0,0 +1,143 @@
|
||||
package io.metersphere.api.domain;
|
||||
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.metersphere.validation.groups.Updated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class ApiDocShare implements Serializable {
|
||||
@Schema(title = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_doc_share.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_doc_share.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_doc_share.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 255, message = "{api_doc_share.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(title = "是否公开; 0: 私有、1: 公开", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_doc_share.is_public.not_blank}", groups = {Created.class})
|
||||
private Boolean isPublic;
|
||||
|
||||
@Schema(title = "访问密码; 私有时需要访问密码")
|
||||
private String password;
|
||||
|
||||
@Schema(title = "允许导出; 0: 不允许、1: 允许")
|
||||
private Boolean allowExport;
|
||||
|
||||
@Schema(title = "接口范围; 全部接口(ALL)、模块(MODULE)、路径(PATH)、标签(TAG)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_doc_share.api_range.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 10, message = "{api_doc_share.api_range.length_range}", groups = {Created.class, Updated.class})
|
||||
private String apiRange;
|
||||
|
||||
@Schema(title = "范围匹配符; 包含(CONTAINS)、等于(EQUALS)")
|
||||
private String rangeMatchSymbol;
|
||||
|
||||
@Schema(title = "范围匹配值; eg: 选中路径范围时, 该值作为路径匹配")
|
||||
private String rangeMatchVal;
|
||||
|
||||
@Schema(title = "失效时间值")
|
||||
private Integer invalidTime;
|
||||
|
||||
@Schema(title = "失效时间单位; 小时(HOUR)、天(DAY)、月(MONTH)、年(YEAR)")
|
||||
private String invalidUnit;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(title = "创建人")
|
||||
private String createUser;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
isPublic("is_public", "isPublic", "BIT", false),
|
||||
password("password", "password", "VARCHAR", true),
|
||||
allowExport("allow_export", "allowExport", "BIT", false),
|
||||
apiRange("api_range", "apiRange", "VARCHAR", false),
|
||||
rangeMatchSymbol("range_match_symbol", "rangeMatchSymbol", "VARCHAR", false),
|
||||
rangeMatchVal("range_match_val", "rangeMatchVal", "VARCHAR", false),
|
||||
invalidTime("invalid_time", "invalidTime", "INTEGER", false),
|
||||
invalidUnit("invalid_unit", "invalidUnit", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
public static Column[] all() {
|
||||
return Column.values();
|
||||
}
|
||||
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
||||
package io.metersphere.api.mapper;
|
||||
|
||||
import io.metersphere.api.domain.ApiDocShare;
|
||||
import io.metersphere.api.domain.ApiDocShareExample;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ApiDocShareMapper {
|
||||
long countByExample(ApiDocShareExample example);
|
||||
|
||||
int deleteByExample(ApiDocShareExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(ApiDocShare record);
|
||||
|
||||
int insertSelective(ApiDocShare record);
|
||||
|
||||
List<ApiDocShare> selectByExample(ApiDocShareExample example);
|
||||
|
||||
ApiDocShare selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") ApiDocShare record, @Param("example") ApiDocShareExample example);
|
||||
|
||||
int updateByExample(@Param("record") ApiDocShare record, @Param("example") ApiDocShareExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(ApiDocShare record);
|
||||
|
||||
int updateByPrimaryKey(ApiDocShare record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiDocShare> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiDocShare> list, @Param("selective") ApiDocShare.Column ... selective);
|
||||
}
|
@ -0,0 +1,386 @@
|
||||
<?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.api.mapper.ApiDocShareMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiDocShare">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="is_public" jdbcType="BIT" property="isPublic" />
|
||||
<result column="password" jdbcType="VARCHAR" property="password" />
|
||||
<result column="allow_export" jdbcType="BIT" property="allowExport" />
|
||||
<result column="api_range" jdbcType="VARCHAR" property="apiRange" />
|
||||
<result column="range_match_symbol" jdbcType="VARCHAR" property="rangeMatchSymbol" />
|
||||
<result column="range_match_val" jdbcType="VARCHAR" property="rangeMatchVal" />
|
||||
<result column="invalid_time" jdbcType="INTEGER" property="invalidTime" />
|
||||
<result column="invalid_unit" jdbcType="VARCHAR" property="invalidUnit" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
</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>
|
||||
</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>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, is_public, `password`, allow_export, api_range, range_match_symbol, range_match_val,
|
||||
invalid_time, invalid_unit, create_time, create_user
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiDocShareExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from api_doc_share
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from api_doc_share
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from api_doc_share
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.api.domain.ApiDocShareExample">
|
||||
delete from api_doc_share
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.api.domain.ApiDocShare">
|
||||
insert into api_doc_share (id, `name`, is_public,
|
||||
`password`, allow_export, api_range,
|
||||
range_match_symbol, range_match_val, invalid_time,
|
||||
invalid_unit, create_time, create_user
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{isPublic,jdbcType=BIT},
|
||||
#{password,jdbcType=VARCHAR}, #{allowExport,jdbcType=BIT}, #{apiRange,jdbcType=VARCHAR},
|
||||
#{rangeMatchSymbol,jdbcType=VARCHAR}, #{rangeMatchVal,jdbcType=VARCHAR}, #{invalidTime,jdbcType=INTEGER},
|
||||
#{invalidUnit,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiDocShare">
|
||||
insert into api_doc_share
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="isPublic != null">
|
||||
is_public,
|
||||
</if>
|
||||
<if test="password != null">
|
||||
`password`,
|
||||
</if>
|
||||
<if test="allowExport != null">
|
||||
allow_export,
|
||||
</if>
|
||||
<if test="apiRange != null">
|
||||
api_range,
|
||||
</if>
|
||||
<if test="rangeMatchSymbol != null">
|
||||
range_match_symbol,
|
||||
</if>
|
||||
<if test="rangeMatchVal != null">
|
||||
range_match_val,
|
||||
</if>
|
||||
<if test="invalidTime != null">
|
||||
invalid_time,
|
||||
</if>
|
||||
<if test="invalidUnit != null">
|
||||
invalid_unit,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isPublic != null">
|
||||
#{isPublic,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="password != null">
|
||||
#{password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="allowExport != null">
|
||||
#{allowExport,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="apiRange != null">
|
||||
#{apiRange,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rangeMatchSymbol != null">
|
||||
#{rangeMatchSymbol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rangeMatchVal != null">
|
||||
#{rangeMatchVal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="invalidTime != null">
|
||||
#{invalidTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="invalidUnit != null">
|
||||
#{invalidUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiDocShareExample" resultType="java.lang.Long">
|
||||
select count(*) from api_doc_share
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update api_doc_share
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.isPublic != null">
|
||||
is_public = #{record.isPublic,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.password != null">
|
||||
`password` = #{record.password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.allowExport != null">
|
||||
allow_export = #{record.allowExport,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.apiRange != null">
|
||||
api_range = #{record.apiRange,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.rangeMatchSymbol != null">
|
||||
range_match_symbol = #{record.rangeMatchSymbol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.rangeMatchVal != null">
|
||||
range_match_val = #{record.rangeMatchVal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.invalidTime != null">
|
||||
invalid_time = #{record.invalidTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.invalidUnit != null">
|
||||
invalid_unit = #{record.invalidUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update api_doc_share
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
is_public = #{record.isPublic,jdbcType=BIT},
|
||||
`password` = #{record.password,jdbcType=VARCHAR},
|
||||
allow_export = #{record.allowExport,jdbcType=BIT},
|
||||
api_range = #{record.apiRange,jdbcType=VARCHAR},
|
||||
range_match_symbol = #{record.rangeMatchSymbol,jdbcType=VARCHAR},
|
||||
range_match_val = #{record.rangeMatchVal,jdbcType=VARCHAR},
|
||||
invalid_time = #{record.invalidTime,jdbcType=INTEGER},
|
||||
invalid_unit = #{record.invalidUnit,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiDocShare">
|
||||
update api_doc_share
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isPublic != null">
|
||||
is_public = #{isPublic,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="password != null">
|
||||
`password` = #{password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="allowExport != null">
|
||||
allow_export = #{allowExport,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="apiRange != null">
|
||||
api_range = #{apiRange,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rangeMatchSymbol != null">
|
||||
range_match_symbol = #{rangeMatchSymbol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rangeMatchVal != null">
|
||||
range_match_val = #{rangeMatchVal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="invalidTime != null">
|
||||
invalid_time = #{invalidTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="invalidUnit != null">
|
||||
invalid_unit = #{invalidUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiDocShare">
|
||||
update api_doc_share
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
is_public = #{isPublic,jdbcType=BIT},
|
||||
`password` = #{password,jdbcType=VARCHAR},
|
||||
allow_export = #{allowExport,jdbcType=BIT},
|
||||
api_range = #{apiRange,jdbcType=VARCHAR},
|
||||
range_match_symbol = #{rangeMatchSymbol,jdbcType=VARCHAR},
|
||||
range_match_val = #{rangeMatchVal,jdbcType=VARCHAR},
|
||||
invalid_time = #{invalidTime,jdbcType=INTEGER},
|
||||
invalid_unit = #{invalidUnit,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_doc_share
|
||||
(id, `name`, is_public, `password`, allow_export, api_range, range_match_symbol,
|
||||
range_match_val, invalid_time, invalid_unit, create_time, create_user)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.isPublic,jdbcType=BIT},
|
||||
#{item.password,jdbcType=VARCHAR}, #{item.allowExport,jdbcType=BIT}, #{item.apiRange,jdbcType=VARCHAR},
|
||||
#{item.rangeMatchSymbol,jdbcType=VARCHAR}, #{item.rangeMatchVal,jdbcType=VARCHAR},
|
||||
#{item.invalidTime,jdbcType=INTEGER}, #{item.invalidUnit,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||
#{item.createUser,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_doc_share (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'is_public'.toString() == column.value">
|
||||
#{item.isPublic,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'password'.toString() == column.value">
|
||||
#{item.password,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'allow_export'.toString() == column.value">
|
||||
#{item.allowExport,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'api_range'.toString() == column.value">
|
||||
#{item.apiRange,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'range_match_symbol'.toString() == column.value">
|
||||
#{item.rangeMatchSymbol,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'range_match_val'.toString() == column.value">
|
||||
#{item.rangeMatchVal,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'invalid_time'.toString() == column.value">
|
||||
#{item.invalidTime,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'invalid_unit'.toString() == column.value">
|
||||
#{item.invalidUnit,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -77,5 +77,23 @@ CREATE INDEX idx_all_resource_pool ON project(all_resource_pool);
|
||||
|
||||
ALTER TABLE schedule ADD COLUMN num bigint not null comment '业务ID';
|
||||
CREATE INDEX idx_num ON schedule(`num`);
|
||||
|
||||
-- 接口文档分享表
|
||||
CREATE TABLE api_doc_share (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '主键' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '名称' ,
|
||||
`is_public` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否公开; 0: 私有、1: 公开' ,
|
||||
`password` VARCHAR(10) COMMENT '访问密码; 私有时需要访问密码' ,
|
||||
`allow_export` BIT(1) DEFAULT 0 COMMENT '允许导出; 0: 不允许、1: 允许' ,
|
||||
`api_range` VARCHAR(10) NOT NULL DEFAULT 'ALL' COMMENT '接口范围; 全部接口(ALL)、模块(MODULE)、路径(PATH)、标签(TAG)' ,
|
||||
`range_match_symbol` VARCHAR(10) COMMENT '范围匹配符; 包含(CONTAINS)、等于(EQUALS)' ,
|
||||
`range_match_val` VARCHAR(1000) COMMENT '范围匹配值; eg: 选中路径范围时, 该值作为路径匹配' ,
|
||||
`invalid_time` INT COMMENT '失效时间值' ,
|
||||
`invalid_unit` VARCHAR(10) COMMENT '失效时间单位; 小时(HOUR)、天(DAY)、月(MONTH)、年(YEAR)' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '接口文档分享';
|
||||
|
||||
-- set innodb lock wait timeout to default
|
||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
@ -447,4 +447,15 @@ api_definition.status.continuous=连调中
|
||||
|
||||
api_test_case.clear.api_change=忽略本次变更差异
|
||||
api_test_case.ignore.api_change=忽略全部变更差异
|
||||
# api doc share i18n
|
||||
api_doc_share.id.not_blank=主键不能为空
|
||||
api_doc_share.id.length_range=主键长度必须在{min}和{max}之间
|
||||
api_doc_share.name.not_blank=名称不能为空
|
||||
api_doc_share.name.length_range=名称长度必须在{min}和{max}之间
|
||||
api_doc_share.is_public.not_blank=是否公开不能为空
|
||||
api_doc_share.is_public.length_range=是否公开长度必须在{min}和{max}之间
|
||||
api_doc_share.api_range.not_blank=接口范围不能为空
|
||||
api_doc_share.api_range.length_range=接口范围长度必须在{min}和{max}之间
|
||||
api_doc_share.create_user.not_blank=创建人不能为空
|
||||
api_doc_share.create_user.length_range=创建人长度必须在{min}和{max}之间
|
||||
|
||||
|
@ -456,4 +456,15 @@ api_test_case.ignore.api_change=Ignore all change differences
|
||||
|
||||
curl_script_is_empty=Curl script cannot be empty
|
||||
curl_script_is_invalid=Curl script is invalid
|
||||
curl_raw_content_is_invalid=Raw content is invalid
|
||||
curl_raw_content_is_invalid=Raw content is invalid
|
||||
# api doc share i18n
|
||||
api_doc_share.id.not_blank=id cannot be empty
|
||||
api_doc_share.id.length_range=id length must be between {min} and {max}
|
||||
api_doc_share.name.not_blank=name cannot be empty
|
||||
api_doc_share.name.length_range=name length must be between {min} and {max}
|
||||
api_doc_share.is_public.not_blank=isPublic cannot be empty
|
||||
api_doc_share.is_public.length_range=isPublic length must be between {min} and {max}
|
||||
api_doc_share.api_range.not_blank=apiRange cannot be empty
|
||||
api_doc_share.api_range.length_range=apiRange length must be between {min} and {max}
|
||||
api_doc_share.create_user.not_blank=createUser cannot be empty
|
||||
api_doc_share.create_user.length_range=createUser length must be between {min} and {max}
|
@ -424,4 +424,15 @@ api_test_case.ignore.api_change=忽略全部变更差异
|
||||
|
||||
curl_script_is_empty=cURL脚本不能为空
|
||||
curl_script_is_invalid=cURL脚本格式不正确
|
||||
curl_raw_content_is_invalid=raw内容格式不正确
|
||||
curl_raw_content_is_invalid=raw内容格式不正确
|
||||
# api doc share i18n
|
||||
api_doc_share.id.not_blank=主键不能为空
|
||||
api_doc_share.id.length_range=主键长度必须在{min}和{max}之间
|
||||
api_doc_share.name.not_blank=名称不能为空
|
||||
api_doc_share.name.length_range=名称长度必须在{min}和{max}之间
|
||||
api_doc_share.is_public.not_blank=是否公开不能为空
|
||||
api_doc_share.is_public.length_range=是否公开长度必须在{min}和{max}之间
|
||||
api_doc_share.api_range.not_blank=接口范围不能为空
|
||||
api_doc_share.api_range.length_range=接口范围长度必须在{min}和{max}之间
|
||||
api_doc_share.create_user.not_blank=创建人不能为空
|
||||
api_doc_share.create_user.length_range=创建人长度必须在{min}和{max}之间
|
@ -424,4 +424,15 @@ api_test_case.ignore.api_change=忽略全部變更差異
|
||||
|
||||
curl_script_is_empty=curl脚本不能爲空
|
||||
curl_script_is_invalid=curl脚本格式不正確
|
||||
curl_raw_content_is_invalid=raw内容格式不正確
|
||||
curl_raw_content_is_invalid=raw内容格式不正確
|
||||
# api doc share i18n
|
||||
api_doc_share.id.not_blank=主键不能為空
|
||||
api_doc_share.id.length_range=主键長度必須在{min}和{max}之间
|
||||
api_doc_share.name.not_blank=名称不能為空
|
||||
api_doc_share.name.length_range=名称長度必須在{min}和{max}之间
|
||||
api_doc_share.is_public.not_blank=是否公开不能為空
|
||||
api_doc_share.is_public.length_range=是否公开長度必須在{min}和{max}之间
|
||||
api_doc_share.api_range.not_blank=接口范围不能為空
|
||||
api_doc_share.api_range.length_range=接口范围長度必須在{min}和{max}之间
|
||||
api_doc_share.create_user.not_blank=创建人不能為空
|
||||
api_doc_share.create_user.length_range=创建人長度必須在{min}和{max}之间
|
Loading…
Reference in New Issue
Block a user