fix(接口自动化): 修复场景自动化列表 创建人,负责人显示 和 筛选问题 #1004989

This commit is contained in:
fit2-zhao 2021-07-12 15:25:39 +08:00 committed by fit2-zhao
parent 76247d0f08
commit eb460e8545
4 changed files with 19 additions and 5 deletions

View File

@ -13,6 +13,7 @@ public class ApiScenarioDTO extends ApiScenarioWithBLOBs {
private String projectName; private String projectName;
private String userName; private String userName;
private List<String> tagNames; private List<String> tagNames;
private String principalName;
/** /**
* 场景跨项目ID * 场景跨项目ID

View File

@ -149,10 +149,11 @@
api_scenario.status, api_scenario.principal, api_scenario.step_total, api_scenario.follow_people, api_scenario.status, api_scenario.principal, api_scenario.step_total, api_scenario.follow_people,
api_scenario.last_result,api_scenario.pass_rate,api_scenario.report_id, api_scenario.last_result,api_scenario.pass_rate,api_scenario.report_id,
api_scenario.schedule, api_scenario.description, api_scenario.create_time, api_scenario.update_time, api_scenario.schedule, api_scenario.description, api_scenario.create_time, api_scenario.update_time,
project.name as project_name, user.name as user_name project.name as project_name, user.name as user_name ,u2.name as principal_name
from api_scenario from api_scenario
left join project on api_scenario.project_id = project.id left join project on api_scenario.project_id = project.id
left join user on api_scenario.user_id = user.id left join user on api_scenario.user_id = user.id
left join user u2 on api_scenario.principal = u2.id
<include refid="queryWhereCondition"/> <include refid="queryWhereCondition"/>
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
</select> </select>
@ -224,6 +225,12 @@
#{value} #{value}
</foreach> </foreach>
</when> </when>
<when test="key=='user_name'">
and api_scenario.user_id in
<foreach collection="values" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</when>
<when test="key=='level'"> <when test="key=='level'">
and api_scenario.level in and api_scenario.level in
<foreach collection="values" item="value" separator="," open="(" close=")"> <foreach collection="values" item="value" separator="," open="(" close=")">
@ -248,6 +255,12 @@
#{value} #{value}
</foreach> </foreach>
</when> </when>
<when test="key=='principal_name'">
and api_scenario.principal in
<foreach collection="values" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</when>
</choose> </choose>
</if> </if>

View File

@ -98,14 +98,14 @@
</template> </template>
</ms-table-column> </ms-table-column>
<ms-table-column prop="principal" <ms-table-column prop="principalName"
min-width="120px" min-width="120px"
:label="$t('api_test.definition.api_principal')" :label="$t('api_test.definition.api_principal')"
:filters="userFilters" :filters="userFilters"
:field="item" :field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
sortable/> sortable/>
<ms-table-column prop="userId" min-width="120px" <ms-table-column prop="userName" min-width="120px"
:label="$t('api_test.automation.creator')" :label="$t('api_test.automation.creator')"
:filters="userFilters" :filters="userFilters"
:field="item" :field="item"

View File

@ -66,8 +66,8 @@ export const CUSTOM_TABLE_HEADER = {
{id: 'level', key: '3', label: i18n.t('api_test.automation.case_level')}, {id: 'level', key: '3', label: i18n.t('api_test.automation.case_level')},
{id: 'status', key: '4', label: i18n.t('test_track.plan.plan_status')}, {id: 'status', key: '4', label: i18n.t('test_track.plan.plan_status')},
{id: 'tags', key: '5', label: i18n.t('commons.tag')}, {id: 'tags', key: '5', label: i18n.t('commons.tag')},
{id: 'userId', key: '6', label: i18n.t('api_test.automation.creator')}, {id: 'userName', key: '6', label: i18n.t('api_test.automation.creator')},
{id: 'principal', key: '7', label: i18n.t('api_test.definition.api_principal')}, {id: 'principalName', key: '7', label: i18n.t('api_test.definition.api_principal')},
{id: 'updateTime', key: '8', label: i18n.t('api_test.definition.api_last_time')}, {id: 'updateTime', key: '8', label: i18n.t('api_test.definition.api_last_time')},
{id: 'stepTotal', key: '9', label: i18n.t('api_test.automation.step')}, {id: 'stepTotal', key: '9', label: i18n.t('api_test.automation.step')},
{id: 'lastResult', key: 'a', label: i18n.t('api_test.automation.last_result')}, {id: 'lastResult', key: 'a', label: i18n.t('api_test.automation.last_result')},