From 53219a73a499509e4b134138e6d0b77edfcc7815 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期六, 13 十一月 2021 00:03:34 +0800
Subject: [PATCH] 优化代码
---
java110-db/src/main/resources/mapper/report/ReportCustomComponentRelV1ServiceDaoImplMapper.xml | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/report/ReportCustomComponentRelV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/report/ReportCustomComponentRelV1ServiceDaoImplMapper.xml
index 30d6362..67869a6 100644
--- a/java110-db/src/main/resources/mapper/report/ReportCustomComponentRelV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/report/ReportCustomComponentRelV1ServiceDaoImplMapper.xml
@@ -28,7 +28,7 @@
and t.rel_id= #{relId}
</if>
<if test="componentType !=null and componentType != ''">
- and t.component_type= #{componentType}
+ and cc.component_type= #{componentType}
</if>
<if test="componentId !=null and componentId != ''">
and t.component_id= #{componentId}
@@ -76,12 +76,13 @@
<select id="queryReportCustomComponentRelsCount" parameterType="Map" resultType="Map">
select count(1) count
from report_custom_component_rel t
+ left join report_custom_component cc on t.component_id = cc.component_id and cc.status_cd = '0'
where 1 =1
<if test="relId !=null and relId != ''">
and t.rel_id= #{relId}
</if>
<if test="componentType !=null and componentType != ''">
- and t.component_type= #{componentType}
+ and cc.component_type= #{componentType}
</if>
<if test="componentId !=null and componentId != ''">
and t.component_id= #{componentId}
--
Gitblit v1.8.0