fix(测试计划): 待办的测试计划列表筛选问题
--bug=1048995 --user=宋昌昌 【工作台】待办-测试计划列表-状态-筛选显示计划错误 https://www.tapd.cn/55049933/s/1613219
This commit is contained in:
parent
090e7c2344
commit
7e46538c6b
|
@ -24,6 +24,9 @@ public interface ExtTestPlanMapper {
|
||||||
@BaseConditionFilter
|
@BaseConditionFilter
|
||||||
List<TestPlanResponse> selectByConditions(@Param("request") TestPlanTableRequest request);
|
List<TestPlanResponse> selectByConditions(@Param("request") TestPlanTableRequest request);
|
||||||
|
|
||||||
|
@BaseConditionFilter
|
||||||
|
List<TestPlanResponse> selectTodoByConditions(@Param("request") TestPlanTableRequest request);
|
||||||
|
|
||||||
List<String> selectIdByConditions(@Param("request") TestPlanBatchProcessRequest request);
|
List<String> selectIdByConditions(@Param("request") TestPlanBatchProcessRequest request);
|
||||||
|
|
||||||
List<String> selectGroupIdByConditions(TestPlanQueryConditions testPlanQueryConditions);
|
List<String> selectGroupIdByConditions(TestPlanQueryConditions testPlanQueryConditions);
|
||||||
|
|
|
@ -64,6 +64,27 @@
|
||||||
<include refid="queryByTableRequest"/>
|
<include refid="queryByTableRequest"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTodoByConditions" resultMap="BaseResultMapDTO">
|
||||||
|
select
|
||||||
|
t.id,t.num,t.name,t.status,t.group_id,
|
||||||
|
t.create_user as createuser,
|
||||||
|
createuser.name as createusername,
|
||||||
|
t.create_time as createtime,
|
||||||
|
t.module_id as moduleid,
|
||||||
|
t.type,
|
||||||
|
t.description,
|
||||||
|
t.pos,
|
||||||
|
t.planned_start_time as plannedstarttime,
|
||||||
|
t.planned_end_time as plannedendtime,
|
||||||
|
t.actual_start_time as actualstarttime,
|
||||||
|
t.actual_end_time as actualendtime,
|
||||||
|
t.tags
|
||||||
|
from test_plan t
|
||||||
|
inner join user createuser on t.create_user = createuser.id
|
||||||
|
where t.project_id = #{request.projectid}
|
||||||
|
<include refid="queryByTableRequest"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectByGroupIds"
|
<select id="selectByGroupIds"
|
||||||
resultMap="BaseResultMapDTO">
|
resultMap="BaseResultMapDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -101,6 +122,19 @@
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.innerIds != null and request.innerIds.size() > 0">
|
||||||
|
and (
|
||||||
|
t.id in
|
||||||
|
<foreach collection="request.innerIds" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
or
|
||||||
|
t.group_id in
|
||||||
|
<foreach collection="request.innerIds" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="!request.myTodo">
|
<if test="!request.myTodo">
|
||||||
<include refid="baseConditionQuery"/>
|
<include refid="baseConditionQuery"/>
|
||||||
|
@ -119,7 +153,7 @@
|
||||||
</if>
|
</if>
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="request.innerIds != null and request.innerIds.size() > 0">
|
<if test="request.innerIds != null and request.innerIds.size() > 0 and !request.myTodo">
|
||||||
and t.id in
|
and t.id in
|
||||||
<foreach collection="request.innerIds" item="id" open="(" separator="," close=")">
|
<foreach collection="request.innerIds" item="id" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
private static final String AUTO_GEN_PLAN_REPORT = "/test-plan/report/auto-gen";
|
private static final String AUTO_GEN_PLAN_REPORT = "/test-plan/report/auto-gen";
|
||||||
private static final String GET_PLAN_REPORT = "/test-plan/report/get";
|
private static final String GET_PLAN_REPORT = "/test-plan/report/get";
|
||||||
private static final String GET_PLAN_TASK_RESULT = "/test-plan/report/get-task";
|
private static final String GET_PLAN_TASK_RESULT = "/test-plan/report/get-task";
|
||||||
|
private static final String GET_PLAN_RESULT = "/test-plan/report/get-result";
|
||||||
private static final String EDIT_PLAN_REPORT_AND_UPLOAD_PIC = "/test-plan/report/upload/md/file";
|
private static final String EDIT_PLAN_REPORT_AND_UPLOAD_PIC = "/test-plan/report/upload/md/file";
|
||||||
private static final String EDIT_PLAN_REPORT = "/test-plan/report/detail/edit";
|
private static final String EDIT_PLAN_REPORT = "/test-plan/report/detail/edit";
|
||||||
private static final String GET_PLAN_REPORT_DETAIL_BUG_PAGE = "/test-plan/report/detail/bug/page";
|
private static final String GET_PLAN_REPORT_DETAIL_BUG_PAGE = "/test-plan/report/detail/bug/page";
|
||||||
|
@ -100,7 +101,7 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
request.setProjectId("100001100001");
|
request.setProjectId("100001100001");
|
||||||
request.setCurrent(1);
|
request.setCurrent(1);
|
||||||
request.setPageSize(10);
|
request.setPageSize(10);
|
||||||
request.setKeyword("1");
|
request.initKeyword("1");
|
||||||
MvcResult mvcResult = this.requestPostWithOkAndReturn(LIST_PLAN_REPORT, request);
|
MvcResult mvcResult = this.requestPostWithOkAndReturn(LIST_PLAN_REPORT, request);
|
||||||
// 获取返回值
|
// 获取返回值
|
||||||
String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8);
|
String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8);
|
||||||
|
@ -119,7 +120,7 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
Assertions.assertTrue(StringUtils.contains(report.getName(), request.getKeyword()));
|
Assertions.assertTrue(StringUtils.contains(report.getName(), request.getKeyword()));
|
||||||
// 覆盖排序, 及数据为空
|
// 覆盖排序, 及数据为空
|
||||||
request.setSort(Map.of("tpr.create_time", "asc"));
|
request.setSort(Map.of("tpr.create_time", "asc"));
|
||||||
request.setKeyword("oasis");
|
request.initKeyword("oasis");
|
||||||
this.requestPost(LIST_PLAN_REPORT, request);
|
this.requestPost(LIST_PLAN_REPORT, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,6 +305,8 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
this.requestGet(GET_PLAN_REPORT + "/" + "test-plan-report-id-5");
|
this.requestGet(GET_PLAN_REPORT + "/" + "test-plan-report-id-5");
|
||||||
this.requestGet(GET_PLAN_TASK_RESULT + "/" + "task-id-1");
|
this.requestGet(GET_PLAN_TASK_RESULT + "/" + "task-id-1");
|
||||||
this.requestGet(GET_PLAN_TASK_RESULT + "/" + "task-id-2");
|
this.requestGet(GET_PLAN_TASK_RESULT + "/" + "task-id-2");
|
||||||
|
this.requestGet(GET_PLAN_RESULT + "/" + "task-id-1");
|
||||||
|
this.requestGet(GET_PLAN_RESULT + "/" + "task-id-2");
|
||||||
// 为了不影响后续报告的清理
|
// 为了不影响后续报告的清理
|
||||||
cleanDefaultTaskReportRelate();
|
cleanDefaultTaskReportRelate();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue