fix(我的工作台): 修复我的仪表盘所属项目列不回显问题
--bug=1010430--user=郭雨琦 修复我的仪表盘所属项目列不回显问题 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001010430 Closes #10791
This commit is contained in:
parent
cf1caa48c0
commit
3513a43e14
|
@ -46,6 +46,9 @@
|
||||||
<select id="getIssues" resultType="io.metersphere.base.domain.IssuesDao">
|
<select id="getIssues" resultType="io.metersphere.base.domain.IssuesDao">
|
||||||
select
|
select
|
||||||
<include refid="Issue_List_Column"/>
|
<include refid="Issue_List_Column"/>
|
||||||
|
<if test="request.projectId != null||request.workspaceId != null">
|
||||||
|
, project.name as projectName
|
||||||
|
</if>
|
||||||
from issues
|
from issues
|
||||||
<if test="request.projectId != null||request.workspaceId != null">
|
<if test="request.projectId != null||request.workspaceId != null">
|
||||||
left join
|
left join
|
||||||
|
|
|
@ -22,7 +22,6 @@ import io.metersphere.base.mapper.ext.ExtTestCaseMapper;
|
||||||
import io.metersphere.commons.constants.IssueRefType;
|
import io.metersphere.commons.constants.IssueRefType;
|
||||||
import io.metersphere.commons.constants.TestCaseConstants;
|
import io.metersphere.commons.constants.TestCaseConstants;
|
||||||
import io.metersphere.commons.constants.TestCaseReviewStatus;
|
import io.metersphere.commons.constants.TestCaseReviewStatus;
|
||||||
import io.metersphere.commons.constants.UserGroupType;
|
|
||||||
import io.metersphere.commons.exception.MSException;
|
import io.metersphere.commons.exception.MSException;
|
||||||
import io.metersphere.commons.user.SessionUser;
|
import io.metersphere.commons.user.SessionUser;
|
||||||
import io.metersphere.commons.utils.*;
|
import io.metersphere.commons.utils.*;
|
||||||
|
@ -124,10 +123,6 @@ public class TestCaseService {
|
||||||
@Resource
|
@Resource
|
||||||
TestCaseTestMapper testCaseTestMapper;
|
TestCaseTestMapper testCaseTestMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private GroupMapper groupMapper;
|
|
||||||
@Resource
|
|
||||||
private UserGroupMapper userGroupMapper;
|
|
||||||
@Resource
|
|
||||||
private LoadTestMapper loadTestMapper;
|
private LoadTestMapper loadTestMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ApiScenarioMapper apiScenarioMapper;
|
private ApiScenarioMapper apiScenarioMapper;
|
||||||
|
@ -549,11 +544,20 @@ public class TestCaseService {
|
||||||
buildUserInfo(list);
|
buildUserInfo(list);
|
||||||
if (StringUtils.isNotBlank(request.getProjectId())) {
|
if (StringUtils.isNotBlank(request.getProjectId())) {
|
||||||
buildProjectInfo(request.getProjectId(), list);
|
buildProjectInfo(request.getProjectId(), list);
|
||||||
|
}else{
|
||||||
|
buildProjectInfoWidthoutProject(list);
|
||||||
}
|
}
|
||||||
list = this.parseStatus(list);
|
list = this.parseStatus(list);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void buildProjectInfoWidthoutProject(List<TestCaseDTO> resList) {
|
||||||
|
resList.forEach(i -> {
|
||||||
|
Project project = projectMapper.selectByPrimaryKey(i.getProjectId());
|
||||||
|
i.setProjectName(project.getName());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public List<TestCaseDTO> publicListTestCase(QueryTestCaseRequest request) {
|
public List<TestCaseDTO> publicListTestCase(QueryTestCaseRequest request) {
|
||||||
this.initRequest(request, true);
|
this.initRequest(request, true);
|
||||||
setDefaultOrder(request);
|
setDefaultOrder(request);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 938368d43648ff6d0cae3dd1465e06a74fba29f5
|
Subproject commit e99b58ef6511288a8665a1baf427c1b799339f70
|
Loading…
Reference in New Issue