fix: 当前工作空间

This commit is contained in:
guoyuqi 2021-10-28 18:26:44 +08:00 committed by 刘瑞斌
parent 9f5842bac5
commit 292bf64533
5 changed files with 19 additions and 4 deletions

View File

@ -320,7 +320,7 @@
LEFT JOIN api_definition_exec_result t2 ON t1.id = t2.resource_id
LEFT JOIN user deleteUser ON t1.delete_user_id = deleteUser.id
LEFT JOIN api_definition a on t1.api_definition_id = a.id
LEFT JOIN project project ON t1.project_id = project.id
LEFT JOIN project ON t1.project_id = project.id
WHERE 1=1
<if test="request.protocol != null and request.protocol!=''">
and a.protocol = #{request.protocol}
@ -335,6 +335,9 @@
<property name="objectKey" value="request.combine.tags"/>
</include>
</if>
<if test="request.workspaceId != null">
AND project.workspace_id = #{request.workspaceId}
</if>
<if test="request.projectId != null and request.projectId!=''">
and t1.project_id = #{request.projectId}
</if>

View File

@ -18,6 +18,10 @@
issues.creator,issues.resource_id,issues.platform_status,
issues.lastmodify
from issues
<if test="request.projectId != null||request.workspaceId != null">
left join
project on issues.project_id = project.id
</if>
<include refid="queryWhereCondition"/>
and (issues.platform_status != 'delete' or issues.platform_status is NULL)
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
@ -66,7 +70,9 @@
or issues.num LIKE CONCAT('%', #{request.name}, '%')
)
</if>
<if test="request.workspaceId != null">
AND project.workspace_id = #{request.workspaceId}
</if>
<if test="request.projectId != null and request.projectId != ''">
and issues.project_id = #{request.projectId}
</if>

View File

@ -180,7 +180,7 @@
</if>
from test_case left join user u on test_case.create_user=u.id
left join user deleteUser on test_case.delete_user_id=deleteUser.id
left join project project on test_case.project_id = project.id
left join project on test_case.project_id = project.id
<include refid="queryWhereCondition"/>
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
</select>
@ -384,6 +384,9 @@
#{nodeId}
</foreach>
</if>
<if test="request.workspaceId != null">
AND project.workspace_id = #{request.workspaceId}
</if>
<if test="request.projectId != null">
and test_case.project_id = #{request.projectId}
</if>

View File

@ -53,6 +53,9 @@
<if test="request.reviewerId != null">
and test_case_review.id in (select test_case_review_users.review_id from test_case_review_users where test_case_review_users.user_id = #{request.reviewerId})
</if>
<if test="request.workspaceId != null">
AND project.workspace_id = #{request.workspaceId}
</if>
<if test="request.projectId != null">
and test_case_review.project_id = #{request.projectId}
</if>

View File

@ -8,7 +8,7 @@
@select="handleSelect"
:key="menuKey"
router>
<el-menu-item index="/workstation" v-xpack onselectstart="return false"
<el-menu-item index="/workstation" onselectstart="return false"
v-permission="['PROJECT_API_DEFINITION:READ','PROJECT_API_SCENARIO:READ','PROJECT_API_REPORT:READ']">
{{ $t('commons.my_workstation') }}
</el-menu-item>