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
|
||||
List<TestPlanResponse> selectByConditions(@Param("request") TestPlanTableRequest request);
|
||||
|
||||
@BaseConditionFilter
|
||||
List<TestPlanResponse> selectTodoByConditions(@Param("request") TestPlanTableRequest request);
|
||||
|
||||
List<String> selectIdByConditions(@Param("request") TestPlanBatchProcessRequest request);
|
||||
|
||||
List<String> selectGroupIdByConditions(TestPlanQueryConditions testPlanQueryConditions);
|
||||
|
|
|
@ -64,6 +64,27 @@
|
|||
<include refid="queryByTableRequest"/>
|
||||
</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"
|
||||
resultMap="BaseResultMapDTO">
|
||||
SELECT
|
||||
|
@ -101,6 +122,19 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</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 test="!request.myTodo">
|
||||
<include refid="baseConditionQuery"/>
|
||||
|
@ -119,7 +153,7 @@
|
|||
</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
|
||||
<foreach collection="request.innerIds" item="id" open="(" separator="," close=")">
|
||||
#{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 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_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 = "/test-plan/report/detail/edit";
|
||||
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.setCurrent(1);
|
||||
request.setPageSize(10);
|
||||
request.setKeyword("1");
|
||||
request.initKeyword("1");
|
||||
MvcResult mvcResult = this.requestPostWithOkAndReturn(LIST_PLAN_REPORT, request);
|
||||
// 获取返回值
|
||||
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()));
|
||||
// 覆盖排序, 及数据为空
|
||||
request.setSort(Map.of("tpr.create_time", "asc"));
|
||||
request.setKeyword("oasis");
|
||||
request.initKeyword("oasis");
|
||||
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_TASK_RESULT + "/" + "task-id-1");
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue