fix:接口测试-接口定义,使用用例状态筛选,只能筛选当前页面
This commit is contained in:
parent
28161744ed
commit
5d0ba72b72
|
@ -113,19 +113,6 @@ public class ApiDefinitionService {
|
|||
request = this.initRequest(request, true, true);
|
||||
List<ApiDefinitionResult> resList = extApiDefinitionMapper.list(request);
|
||||
calculateResult(resList, request.getProjectId());
|
||||
ApiDefinitionRequest finalRequest = request;
|
||||
/* List<ApiDefinitionResult> resListFilters = new ArrayList<>();
|
||||
if (finalRequest.getFilters().size() > 1) {
|
||||
if (null != finalRequest.getFilters().get("case_status")) {
|
||||
resListFilters = resList.stream()
|
||||
.filter((ApiDefinitionResult b) -> finalRequest.getFilters().get("case_status").contains(b.getCaseStatus()))
|
||||
.collect(Collectors.toList());
|
||||
return resListFilters;
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
return resList;
|
||||
}
|
||||
|
||||
|
@ -884,6 +871,7 @@ public class ApiDefinitionService {
|
|||
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
||||
List<ApiDefinitionResult> resList = extApiDefinitionMapper.listRelevanceReview(request);
|
||||
calculateResult(resList, request.getProjectId());
|
||||
resList = extApiDefinitionMapper.list(request);
|
||||
return resList;
|
||||
}
|
||||
|
||||
|
@ -911,6 +899,7 @@ public class ApiDefinitionService {
|
|||
res.setCaseStatus("-");
|
||||
}
|
||||
|
||||
apiDefinitionMapper.updateByPrimaryKey(res);
|
||||
if (StringUtils.equalsIgnoreCase("esb", res.getMethod())) {
|
||||
esbApiParamService.handleApiEsbParams(res);
|
||||
}
|
||||
|
|
|
@ -41,5 +41,11 @@ public class ApiDefinition implements Serializable {
|
|||
|
||||
private String createUser;
|
||||
|
||||
private String caseTotal;
|
||||
|
||||
private String caseStatus;
|
||||
|
||||
private String casePassingRate;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -1333,6 +1333,216 @@ public class ApiDefinitionExample {
|
|||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalIsNull() {
|
||||
addCriterion("case_total is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalIsNotNull() {
|
||||
addCriterion("case_total is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalEqualTo(String value) {
|
||||
addCriterion("case_total =", value, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalNotEqualTo(String value) {
|
||||
addCriterion("case_total <>", value, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalGreaterThan(String value) {
|
||||
addCriterion("case_total >", value, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("case_total >=", value, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalLessThan(String value) {
|
||||
addCriterion("case_total <", value, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalLessThanOrEqualTo(String value) {
|
||||
addCriterion("case_total <=", value, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalLike(String value) {
|
||||
addCriterion("case_total like", value, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalNotLike(String value) {
|
||||
addCriterion("case_total not like", value, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalIn(List<String> values) {
|
||||
addCriterion("case_total in", values, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalNotIn(List<String> values) {
|
||||
addCriterion("case_total not in", values, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalBetween(String value1, String value2) {
|
||||
addCriterion("case_total between", value1, value2, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseTotalNotBetween(String value1, String value2) {
|
||||
addCriterion("case_total not between", value1, value2, "caseTotal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusIsNull() {
|
||||
addCriterion("case_status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusIsNotNull() {
|
||||
addCriterion("case_status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusEqualTo(String value) {
|
||||
addCriterion("case_status =", value, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusNotEqualTo(String value) {
|
||||
addCriterion("case_status <>", value, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusGreaterThan(String value) {
|
||||
addCriterion("case_status >", value, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("case_status >=", value, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusLessThan(String value) {
|
||||
addCriterion("case_status <", value, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("case_status <=", value, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusLike(String value) {
|
||||
addCriterion("case_status like", value, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusNotLike(String value) {
|
||||
addCriterion("case_status not like", value, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusIn(List<String> values) {
|
||||
addCriterion("case_status in", values, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusNotIn(List<String> values) {
|
||||
addCriterion("case_status not in", values, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusBetween(String value1, String value2) {
|
||||
addCriterion("case_status between", value1, value2, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("case_status not between", value1, value2, "caseStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateIsNull() {
|
||||
addCriterion("case_passing_rate is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateIsNotNull() {
|
||||
addCriterion("case_passing_rate is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateEqualTo(String value) {
|
||||
addCriterion("case_passing_rate =", value, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateNotEqualTo(String value) {
|
||||
addCriterion("case_passing_rate <>", value, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateGreaterThan(String value) {
|
||||
addCriterion("case_passing_rate >", value, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("case_passing_rate >=", value, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateLessThan(String value) {
|
||||
addCriterion("case_passing_rate <", value, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateLessThanOrEqualTo(String value) {
|
||||
addCriterion("case_passing_rate <=", value, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateLike(String value) {
|
||||
addCriterion("case_passing_rate like", value, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateNotLike(String value) {
|
||||
addCriterion("case_passing_rate not like", value, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateIn(List<String> values) {
|
||||
addCriterion("case_passing_rate in", values, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateNotIn(List<String> values) {
|
||||
addCriterion("case_passing_rate not in", values, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateBetween(String value1, String value2) {
|
||||
addCriterion("case_passing_rate between", value1, value2, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCasePassingRateNotBetween(String value1, String value2) {
|
||||
addCriterion("case_passing_rate not between", value1, value2, "casePassingRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -10,16 +10,19 @@
|
|||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||
<result column="schedule" jdbcType="VARCHAR" property="schedule" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="module_id" jdbcType="VARCHAR" property="moduleId" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||
<result column="original_state" jdbcType="VARCHAR" property="originalState" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="module_id" jdbcType="VARCHAR" property="moduleId"/>
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime"/>
|
||||
<result column="protocol" jdbcType="VARCHAR" property="protocol"/>
|
||||
<result column="path" jdbcType="VARCHAR" property="path"/>
|
||||
<result column="num" jdbcType="INTEGER" property="num"/>
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags"/>
|
||||
<result column="original_state" jdbcType="VARCHAR" property="originalState"/>
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser"/>
|
||||
<result column="case_total" jdbcType="VARCHAR" property="caseTotal"/>
|
||||
<result column="case_status" jdbcType="VARCHAR" property="caseStatus"/>
|
||||
<result column="case_passing_rate" jdbcType="VARCHAR" property="casePassingRate"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
|
@ -87,7 +90,7 @@
|
|||
<sql id="Base_Column_List">
|
||||
id, project_id, `name`, `method`, module_path, environment_id, schedule, `status`,
|
||||
module_id, user_id, create_time, update_time, protocol, `path`, num, tags, original_state,
|
||||
create_user
|
||||
create_user, case_total, case_status, case_passing_rate
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description, request, response
|
||||
|
@ -142,21 +145,21 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||
insert into api_definition (id, project_id, `name`,
|
||||
`method`, module_path, environment_id,
|
||||
schedule, `status`, module_id,
|
||||
user_id, create_time, update_time,
|
||||
protocol, `path`, num,
|
||||
tags, original_state, create_user,
|
||||
description, request, response
|
||||
)
|
||||
`method`, module_path, environment_id,
|
||||
schedule, `status`, module_id,
|
||||
user_id, create_time, update_time,
|
||||
protocol, `path`, num,
|
||||
tags, original_state, create_user,
|
||||
case_total, case_status, case_passing_rate,
|
||||
description, request, response)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR},
|
||||
#{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR},
|
||||
#{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
|
||||
#{tags,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=LONGVARCHAR}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
#{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR},
|
||||
#{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR},
|
||||
#{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
|
||||
#{tags,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{caseTotal,jdbcType=VARCHAR}, #{caseStatus,jdbcType=VARCHAR}, #{casePassingRate,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=LONGVARCHAR}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||
insert into api_definition
|
||||
|
@ -215,6 +218,15 @@
|
|||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="caseTotal != null">
|
||||
case_total,
|
||||
</if>
|
||||
<if test="caseStatus != null">
|
||||
case_status,
|
||||
</if>
|
||||
<if test="casePassingRate != null">
|
||||
case_passing_rate,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
|
@ -280,6 +292,15 @@
|
|||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="caseTotal != null">
|
||||
#{caseTotal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="caseStatus != null">
|
||||
#{caseStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="casePassingRate != null">
|
||||
#{casePassingRate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -354,6 +375,15 @@
|
|||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.caseTotal != null">
|
||||
case_total = #{record.caseTotal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.caseStatus != null">
|
||||
case_status = #{record.caseStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.casePassingRate != null">
|
||||
case_passing_rate = #{record.casePassingRate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -378,19 +408,22 @@
|
|||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
original_state = #{record.originalState,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||
response = #{record.response,jdbcType=LONGVARCHAR}
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
original_state = #{record.originalState,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
case_total = #{record.caseTotal,jdbcType=VARCHAR},
|
||||
case_status = #{record.caseStatus,jdbcType=VARCHAR},
|
||||
case_passing_rate = #{record.casePassingRate,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||
response = #{record.response,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -404,17 +437,20 @@
|
|||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
original_state = #{record.originalState,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR}
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
original_state = #{record.originalState,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
case_total = #{record.caseTotal,jdbcType=VARCHAR},
|
||||
case_status = #{record.caseStatus,jdbcType=VARCHAR},
|
||||
case_passing_rate = #{record.casePassingRate,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -473,6 +509,15 @@
|
|||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="caseTotal != null">
|
||||
case_total = #{caseTotal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="caseStatus != null">
|
||||
case_status = #{caseStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="casePassingRate != null">
|
||||
case_passing_rate = #{casePassingRate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -487,47 +532,53 @@
|
|||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||
update api_definition
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
`method` = #{method,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
original_state = #{originalState,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
request = #{request,jdbcType=LONGVARCHAR},
|
||||
response = #{response,jdbcType=LONGVARCHAR}
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
`method` = #{method,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
original_state = #{originalState,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
case_total = #{caseTotal,jdbcType=VARCHAR},
|
||||
case_status = #{caseStatus,jdbcType=VARCHAR},
|
||||
case_passing_rate = #{casePassingRate,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
request = #{request,jdbcType=LONGVARCHAR},
|
||||
response = #{response,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiDefinition">
|
||||
update api_definition
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
`method` = #{method,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
original_state = #{originalState,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR}
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
`method` = #{method,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
schedule = #{schedule,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
original_state = #{originalState,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
case_total = #{caseTotal,jdbcType=VARCHAR},
|
||||
case_status = #{caseStatus,jdbcType=VARCHAR},
|
||||
case_passing_rate = #{casePassingRate,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -515,6 +515,12 @@
|
|||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="key=='case_status'">
|
||||
and api_definition.case_status in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
|
|
|
@ -72,3 +72,10 @@ values ('test_case_list',
|
|||
insert into system_header (type, props)
|
||||
values ('test_plan_scenario_case',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]');
|
||||
-- 接口定义添加用例总数,用例状态,用例通过率字段
|
||||
alter table api_definition
|
||||
add case_total varchar(100) null;
|
||||
alter table api_definition
|
||||
add case_status varchar(100) null;
|
||||
alter table api_definition
|
||||
add case_passing_rate varchar(100) null;
|
|
@ -78,7 +78,9 @@
|
|||
<table tableName="test_plan"/>
|
||||
<table tableName="test_case_test"/>-->
|
||||
<!-- <table tableName="api_test_environment"></table>-->
|
||||
<!--
|
||||
<table tableName="project"></table>
|
||||
-->
|
||||
<!-- <table tableName="custom_field"></table>-->
|
||||
<!-- <table tableName="test_case"></table>-->
|
||||
<!-- <table tableName="test_case"></table>-->
|
||||
|
|
|
@ -128,6 +128,7 @@
|
|||
<ms-table-column
|
||||
v-if="item.id == 'caseTotal'"
|
||||
prop="caseTotal"
|
||||
sortable="custom"
|
||||
width="140px"
|
||||
:label="$t('api_test.definition.api_case_number')"
|
||||
show-overflow-tooltip
|
||||
|
@ -136,6 +137,7 @@
|
|||
<ms-table-column
|
||||
v-if="item.id == 'caseStatus'"
|
||||
prop="caseStatus"
|
||||
:filters="caseStatusFilters"
|
||||
width="130px"
|
||||
:label="$t('api_test.definition.api_case_status')"
|
||||
show-overflow-tooltip
|
||||
|
@ -146,6 +148,7 @@
|
|||
v-if="item.id == 'casePassingRate'"
|
||||
width="150px"
|
||||
prop="casePassingRate"
|
||||
sortable="custom"
|
||||
:label="$t('api_test.definition.api_case_passing_rate')"
|
||||
show-overflow-tooltip
|
||||
:key="index"/>
|
||||
|
|
|
@ -138,9 +138,9 @@ export function _sort(column, condition) {
|
|||
hasProp = true;
|
||||
}
|
||||
});
|
||||
if (column.prop === 'case_passing_rate' || column.prop === 'case_total') {
|
||||
/* if (column.prop === 'case_passing_rate' || column.prop === 'case_total') {
|
||||
hasProp = true;
|
||||
}
|
||||
}*/
|
||||
if (!hasProp) {
|
||||
condition.orders.push({name: column.prop, type: column.order});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue