refactor(测试计划): 优化测试计划报告保留时间清理查询逻辑
--bug=1044722 --user=宋昌昌 【测试计划】github#32364测试计划报告保留时间范围未生效 https://www.tapd.cn/55049933/s/1560377
This commit is contained in:
parent
3d095f7cc5
commit
cf3ca1e567
|
@ -45,10 +45,11 @@
|
|||
</select>
|
||||
<select id="selectReportIdByProjectIdAndTime" resultType="java.lang.String">
|
||||
select report.id
|
||||
from test_plan_report report left join test_plan_report_summary summary
|
||||
from test_plan_report report
|
||||
left join test_plan_report_summary summary
|
||||
on report.id = summary.test_plan_report_id
|
||||
where report.project_id = #{projectId}
|
||||
and report.start_time <= #{time}
|
||||
and report.create_time <= #{time}
|
||||
</select>
|
||||
<select id="selectReportIdTestPlanIds" resultType="java.lang.String">
|
||||
select report.id
|
||||
|
@ -180,7 +181,8 @@
|
|||
<include refid="filterByCondition"/>
|
||||
</select>
|
||||
<select id="getHistoryDeleted" resultType="io.metersphere.api.dto.definition.ExecuteReportDTO">
|
||||
select distinct tpr.* from test_plan_report tpr INNER JOIN test_plan_report_summary tprs on tpr.id = tprs.test_plan_report_id
|
||||
select distinct tpr.* from test_plan_report tpr INNER JOIN test_plan_report_summary tprs on tpr.id =
|
||||
tprs.test_plan_report_id
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
where tpr.id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
|
@ -259,7 +261,10 @@
|
|||
</select>
|
||||
|
||||
<delete id="deleteGroupReport" parameterType="java.lang.String">
|
||||
delete from test_plan_report where id = #{id} or parent_id = #{id}
|
||||
delete
|
||||
from test_plan_report
|
||||
where id = #{id}
|
||||
or parent_id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="batchUpdateExecuteTimeAndStatus" parameterType="java.lang.String">
|
||||
|
|
Loading…
Reference in New Issue