refactor(高级搜索): 列表支持通过ID搜索

This commit is contained in:
shiziyuan9527 2022-07-01 16:34:05 +08:00 committed by shiziyuan9527
parent afbf4a2118
commit ff2c81876d
6 changed files with 54 additions and 5 deletions

View File

@ -123,6 +123,12 @@
<property name="object" value="${condition}.name"/>
</include>
</if>
<if test='${condition}.id != null'>
and api_definition.num
<include refid="condition">
<property name="object" value="${condition}.id"/>
</include>
</if>
<if test="${condition}.followPeople != null">
and api_definition.id in (
select definition_id from api_definition_follow where follow_id

View File

@ -87,6 +87,17 @@
<property name="object" value="${condition}.name"/>
</include>
</if>
<if test='${condition}.id != null'>
and (api_scenario.num
<include refid="condition">
<property name="object" value="${condition}.id"/>
</include>
or api_scenario.custom_num
<include refid="condition">
<property name="object" value="${condition}.id"/>
</include>
)
</if>
<if test="${condition}.followPeople != null">
and api_scenario.id in (
select scenario_id from api_scenario_follow where follow_id

View File

@ -151,6 +151,12 @@
<property name="object" value="${condition}.name"/>
</include>
</if>
<if test='${condition}.id != null'>
and t1.num
<include refid="condition">
<property name="object" value="${condition}.id"/>
</include>
</if>
<if test="${condition}.followPeople != null">
and t1.id in (
select case_id from api_test_case_follow where follow_id

View File

@ -18,6 +18,12 @@
<property name="object" value="${condition}.name"/>
</include>
</if>
<if test='${condition}.id != null'>
and load_test.num
<include refid="condition">
<property name="object" value="${condition}.id"/>
</include>
</if>
<if test="${condition}.followPeople != null">
and load_test.id in (
select test_id from load_test_follow where follow_id

View File

@ -9,6 +9,17 @@
<property name="object" value="${condition}.name"/>
</include>
</if>
<if test='${condition}.id != null'>
and (test_case.num
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition">
<property name="object" value="${condition}.id"/>
</include>
or test_case.custom_num
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition">
<property name="object" value="${condition}.id"/>
</include>
)
</if>
<if test="${condition}.followPeople != null">
and test_case.id in (
select case_id from test_case_follow where follow_id

View File

@ -656,7 +656,16 @@ export const CASE_DEMAND = {
}
}
export const TEST_CONFIGS = [NAME, UPDATE_TIME, CREATE_TIME, STATUS, CREATOR, FOLLOW_PEOPLE];
export const ID = {
key: "id",
name: 'MsTableSearchInput',
label: 'ID',
operator: {
options: [OPERATORS.LIKE, OPERATORS.NOT_LIKE]
}
}
export const TEST_CONFIGS = [ID, NAME, UPDATE_TIME, CREATE_TIME, STATUS, CREATOR, FOLLOW_PEOPLE];
export const PROJECT_CONFIGS = [NAME, UPDATE_TIME, CREATE_TIME, CREATOR];
@ -667,18 +676,18 @@ export const REPORT_CASE_CONFIGS = [NAME, CREATE_TIME, STATUS, CREATOR, TRIGGER_
export const UI_REPORT_CONFIGS = [NAME, TEST_NAME, CREATE_TIME, UI_REPORT_STATUS, CREATOR, TRIGGER_MODE];
// 测试跟踪-测试用例 列表
export const TEST_CASE_CONFIGS = [NAME, TAGS, MODULE, CREATE_TIME, UPDATE_TIME, CREATOR, CASE_REVIEW_STATUS, FOLLOW_PEOPLE, CASE_DEMAND];
export const TEST_CASE_CONFIGS = [ID, NAME, TAGS, MODULE, CREATE_TIME, UPDATE_TIME, CREATOR, CASE_REVIEW_STATUS, FOLLOW_PEOPLE, CASE_DEMAND];
export const TEST_PLAN_CONFIGS = [NAME, UPDATE_TIME, CREATE_TIME, PRINCIPAL, TEST_PLAN_STATUS, STAGE, TAGS, FOLLOW_PEOPLE, ACTUAL_START_TIME, ACTUAL_END_TIME, PLAN_START_TIME, PLAN_END_TIME];
// 测试跟踪 测试评审列表
export const TEST_REVIEW = [NAME, CREATOR, TAGS, TEST_PLAN_STATUS, FOLLOW_PEOPLE, CREATE_TIME, UPDATE_TIME, END_TIME];
export const API_DEFINITION_CONFIGS = [NAME, API_METHOD, API_PATH, API_STATUS, TAGS, UPDATE_TIME, CREATE_TIME, API_PRINCIPAL, ISREFERENCE, MODULE, FOLLOW_PEOPLE, CASE_COUNT];
export const API_DEFINITION_CONFIGS = [ID, NAME, API_METHOD, API_PATH, API_STATUS, TAGS, UPDATE_TIME, CREATE_TIME, API_PRINCIPAL, ISREFERENCE, MODULE, FOLLOW_PEOPLE, CASE_COUNT];
export const API_CASE_CONFIGS = [NAME, PRIORITY, TAGS, API_CASE_RESULT, UPDATE_TIME, CREATE_TIME, CREATOR, ISREFERENCE, FOLLOW_PEOPLE, API_PATH];
export const API_CASE_CONFIGS = [ID, NAME, PRIORITY, TAGS, API_CASE_RESULT, UPDATE_TIME, CREATE_TIME, CREATOR, ISREFERENCE, FOLLOW_PEOPLE, API_PATH];
export const API_SCENARIO_CONFIGS = [NAME, PRIORITY, TAGS, API_SCENARIO_RESULT, UPDATE_TIME, CREATE_TIME, CREATOR, FOLLOW_PEOPLE, STEP_COUNT, MODULE, API_STATUS];
export const API_SCENARIO_CONFIGS = [ID, NAME, PRIORITY, TAGS, API_SCENARIO_RESULT, UPDATE_TIME, CREATE_TIME, CREATOR, FOLLOW_PEOPLE, STEP_COUNT, MODULE, API_STATUS];
export const TEST_PLAN_REPORT_CONFIGS = [NAME, TEST_PLAN_NAME, CREATOR, CREATE_TIME, TEST_PLAN_TRIGGER_MODE, TEST_PLAN_REPORT_STATUS];