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

This commit is contained in:
fit2-zhao 2021-07-12 15:25:39 +08:00 committed by fit2-zhao
parent c3c97be40f
commit 81a1186c8c
4 changed files with 10 additions and 8 deletions

View File

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

View File

@ -149,11 +149,12 @@
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.schedule, api_scenario.description, api_scenario.create_time, api_scenario.update_time,
project.name as project_name, user.name as user_name,deleteUser.name AS delete_user,api_scenario.delete_time
project.name as project_name, user.name as user_name,deleteUser.name AS delete_user,api_scenario.delete_time ,u2.name as principal_name
from api_scenario
left join project on api_scenario.project_id = project.id
left join user on api_scenario.user_id = user.id
left join user deleteUser on api_scenario.delete_user_id = deleteUser.id
left join user u2 on api_scenario.principal = u2.id
<include refid="queryWhereCondition"/>
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
</select>
@ -321,10 +322,10 @@
</foreach>
</update>
<update id="removeToGcByExample" parameterType="io.metersphere.base.domain.ApiScenarioExampleWithOperation">
<update id="removeToGcByExample" parameterType="io.metersphere.base.domain.ApiScenarioExample">
update api_scenario
set original_state=status,
status = 'Trash', module_path = null, api_scenario_module_id = null,delete_user_id = #{operator},delete_time = #{operationTime}
status = 'Trash', module_path = null, api_scenario_module_id = null
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
@ -333,7 +334,7 @@
<update id="reduction">
update api_scenario
set
status = original_state,delete_user_id = null,delete_time = null
status = original_state
where id in
<foreach collection="ids" item="v" separator="," open="(" close=")">
#{v}

View File

@ -116,14 +116,14 @@
</template>
</ms-table-column>
<ms-table-column prop="principal"
<ms-table-column prop="principalName"
min-width="120px"
:label="$t('api_test.definition.api_principal')"
:filters="userFilters"
:field="item"
:fields-width="fieldsWidth"
sortable/>
<ms-table-column prop="userId" min-width="120px"
<ms-table-column prop="userName" min-width="120px"
:label="$t('api_test.automation.creator')"
:filters="userFilters"
: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: 'status', key: '4', label: i18n.t('test_track.plan.plan_status')},
{id: 'tags', key: '5', label: i18n.t('commons.tag')},
{id: 'userId', key: '6', label: i18n.t('api_test.automation.creator')},
{id: 'principal', key: '7', label: i18n.t('api_test.definition.api_principal')},
{id: 'userName', key: '6', label: i18n.t('api_test.automation.creator')},
{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: 'stepTotal', key: '9', label: i18n.t('api_test.automation.step')},
{id: 'lastResult', key: 'a', label: i18n.t('api_test.automation.last_result')},