|
@@ -16,52 +16,34 @@
|
|
|
</where>
|
|
|
GROUP BY type
|
|
|
</select>
|
|
|
- <select id="selectfacetotal" resultType="cn.com.taiji.video.model.AnalysisLineDTO">
|
|
|
+ <select id="selecttotal" resultType="cn.com.taiji.video.model.VideoAnalysisLineDTO">
|
|
|
SELECT
|
|
|
<if test="year != null and year != ''">
|
|
|
- `year_month` as time,
|
|
|
+ t.`year_month` as time,
|
|
|
+ (select sum(pic_filter_count) from `ht_dp_video_analysis` t1 where t1.`year_month` = t.`year_month` and t1.type = 1) as face,
|
|
|
+ (select sum(pic_filter_count) from `ht_dp_video_analysis` t1 where t1.`year_month` = t.`year_month` and t1.type = 2) as car,
|
|
|
+ (select sum(pic_filter_count) from `ht_dp_video_analysis` t1 where t1.`year_month` = t.`year_month` and t1.type = 3) as body
|
|
|
</if>
|
|
|
<if test="yearMonth != null and yearMonth != ''">
|
|
|
- stat_date as time,
|
|
|
+ t.stat_date as time,
|
|
|
+ (select sum(pic_filter_count) from `ht_dp_video_analysis` t1 where t1.stat_date = t.stat_date and t1.type = 1) as face,
|
|
|
+ (select sum(pic_filter_count) from `ht_dp_video_analysis` t1 where t1.stat_date = t.stat_date and t1.type = 2) as car,
|
|
|
+ (select sum(pic_filter_count) from `ht_dp_video_analysis` t1 where t1.stat_date = t.stat_date and t1.type = 3) as body
|
|
|
</if>
|
|
|
- sum(pic_filter_count) AS count FROM `ht_dp_video_analysis`
|
|
|
- where type = 1
|
|
|
+ FROM `ht_dp_video_analysis` t
|
|
|
+ where
|
|
|
<if test="year != null and year != ''">
|
|
|
- and `year` = #{year}
|
|
|
- </if>
|
|
|
- <if test="yearMonth != null and yearMonth != ''">
|
|
|
- and `year_month` = #{yearMonth}
|
|
|
- </if>
|
|
|
- GROUP BY
|
|
|
- <if test="year != null and year != ''">
|
|
|
- `year_month`
|
|
|
+ t.`year` = #{year}
|
|
|
</if>
|
|
|
<if test="yearMonth != null and yearMonth != ''">
|
|
|
- stat_date
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="selectcartotal" resultType="cn.com.taiji.video.model.AnalysisLineDTO">
|
|
|
- SELECT
|
|
|
- <if test="year != null and year != ''">
|
|
|
- `year_month` as time,
|
|
|
- </if>
|
|
|
- <if test="yearMonth != null and yearMonth != ''">
|
|
|
- stat_date as time,
|
|
|
- </if>
|
|
|
- sum(pic_filter_count) AS count FROM `ht_dp_video_analysis`
|
|
|
- where type = 2
|
|
|
- <if test="year != null and year != ''">
|
|
|
- and `year` = #{year}
|
|
|
- </if>
|
|
|
- <if test="yearMonth != null and yearMonth != ''">
|
|
|
- and `year_month` = #{yearMonth}
|
|
|
+ t.`year_month` = #{yearMonth}
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
<if test="year != null and year != ''">
|
|
|
- `year_month`
|
|
|
+ t.`year_month`
|
|
|
</if>
|
|
|
<if test="yearMonth != null and yearMonth != ''">
|
|
|
- stat_date
|
|
|
+ t.stat_date
|
|
|
</if>
|
|
|
</select>
|
|
|
</mapper>
|