This commit is contained in:
DirectionOfMind 2021-01-20 16:38:16 +08:00
parent 1ed80a054e
commit c74d643f2f

View File

@ -125,12 +125,14 @@
<select id="statisticalByIndicatorType" <select id="statisticalByIndicatorType"
resultType="com.lz.modules.performance.dto.StatisticalIndicatorTypeDto"> resultType="com.lz.modules.performance.dto.StatisticalIndicatorTypeDto">
SELECT t.name,l.indicator_type,count(l.indicator_type) count from lz_indicator_type t RIGHT JOIN lz_indicator_library l SELECT t.id indicatorType,t.name,IFNULL(l.count,0) count from lz_indicator_type t
on t.id = l.indicator_type where t.is_delete = 0 and l.is_delete=0 LEFT JOIN (SELECT name,indicator_type,count(indicator_type) count from lz_indicator_library where is_delete = 0
<if test="indicatorType!=null"> <if test="indicatorType!=null">
and l.indicator_type=#{indicatorType} and l.indicator_type=#{indicatorType}
</if> </if>
GROUP BY indicator_type GROUP BY indicator_type) l
on t.is_delete = 0 and t.id = l.indicator_type
</select> </select>