fix(项目管理): 修复任务中心接口场景查询不到数据的缺陷
--bug=1039094 --user=王孝刚 【项目任务中心】场景任务列表-按ID搜索抱参数校验失败 https://www.tapd.cn/55049933/s/1499782
This commit is contained in:
parent
17cde73898
commit
a46a9879a5
|
@ -215,26 +215,29 @@
|
|||
</include>
|
||||
</select>
|
||||
<select id="getReports" resultType="io.metersphere.api.dto.report.ReportDTO">
|
||||
select id, pool_id from api_report where
|
||||
select id, pool_id from (select ar.* , project.organization_id from api_report ar
|
||||
left join project on ar.project_id = project.id ) as api_report
|
||||
|
||||
where
|
||||
api_report.deleted = false
|
||||
and api_report.test_plan_id = 'NONE'
|
||||
and api_report.start_time BETWEEN #{startTime} AND #{endTime}
|
||||
and status in ('PENDING', 'RUNNING', 'RERUNNING')
|
||||
and api_report.status in ('PENDING', 'RUNNING', 'RERUNNING')
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
and id in
|
||||
and api_report.id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="projectIds != null and projectIds.size() > 0">
|
||||
and project_id in
|
||||
and api_report.project_id in
|
||||
<foreach collection="projectIds" item="projectId" open="(" separator="," close=")">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.condition.keyword != null">
|
||||
and (
|
||||
name like concat('%', #{request.condition.keyword},'%')
|
||||
api_report.name like concat('%', #{request.condition.keyword},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
|
|
|
@ -111,26 +111,29 @@
|
|||
and api_scenario_report.project_id = #{projectId} limit 500
|
||||
</select>
|
||||
<select id="getReports" resultType="io.metersphere.api.dto.report.ReportDTO">
|
||||
select id, pool_id from api_scenario_report where
|
||||
select id, pool_id from (
|
||||
select asr.*, p.organization_id from api_scenario_report asr
|
||||
left join project p on asr.project_id = p.id ) as api_scenario_report
|
||||
where
|
||||
api_scenario_report.deleted = false
|
||||
and api_scenario_report.test_plan_id = 'NONE'
|
||||
and api_scenario_report.start_time BETWEEN #{startTime} AND #{endTime}
|
||||
and status in ('PENDING', 'RUNNING', 'RERUNNING')
|
||||
and api_scenario_report.status in ('PENDING', 'RUNNING', 'RERUNNING')
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
and id in
|
||||
and api_scenario_report.id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="projectIds != null and projectIds.size() > 0">
|
||||
and project_id in
|
||||
and api_scenario_report.project_id in
|
||||
<foreach collection="projectIds" item="projectId" open="(" separator="," close=")">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.condition.keyword != null">
|
||||
and (
|
||||
name like concat('%', #{request.condition.keyword},'%')
|
||||
api_scenario_report.name like concat('%', #{request.condition.keyword},'%')
|
||||
)
|
||||
</if>
|
||||
<include refid="filters">
|
||||
|
@ -184,7 +187,7 @@
|
|||
<if test="request.keyword != null and request.keyword != ''">
|
||||
and (
|
||||
api_scenario_report.resourceName like concat('%', #{request.keyword},'%')
|
||||
or api_scenario_report.resourceId like concat('%', #{request.keyword},'%')
|
||||
or api_scenario_report.resourceNum like concat('%', #{request.keyword},'%')
|
||||
)
|
||||
</if>
|
||||
<include refid="filters">
|
||||
|
|
Loading…
Reference in New Issue